コードフォーマッター
ブラウザで JavaScript、TypeScript、JSON、CSS、HTML、Markdown などのコードを整形。 Prettier 3 搭載。アップロード不要、設定不要、登録不要。
入力
出力
A tiny, in-browser Prettier playground
Prettier is the de-facto standard for code formatting in the JavaScript world. It enforces a consistent style across files, languages and contributors so teams stop arguing about spaces and semicolons. FreeLabTools wraps Prettier in a zero-setup web UI: paste your code, pick a language, click Format.
サポート言語
We ship Prettier's official plugins so the output matches what you'd get in any Prettier- configured project:
- JavaScript, TypeScript, JSX / React — modern syntax including ES2024, decorators, optional chaining.
- JSON, JSON5 — compact data, plus the more relaxed JSON5 with comments and trailing commas.
- CSS, SCSS, Less — full stylesheet support with selector grouping.
- HTML — including embedded scripts and styles.
- Markdown — table alignment, list normalization, code fence padding.
- YAML — useful for cleaning Docker, Kubernetes, GitHub Actions configs.
- GraphQL — schema and query formatting.
パフォーマンス:なぜ速いのか
Prettier's standalone bundle is small (~85 KB), but each language plugin can be 100-800 KB. Loading them all upfront would slow the first paint. Instead, this page loads plugins on demand: when you pick TypeScript, only the TypeScript plugin downloads. On a typical connection the first format takes about half a second; subsequent ones are instant.
プライバシー
Everything runs inside the browser tab — Prettier itself executes locally. Your code is never sent to a server. The only network traffic is the (one-time) download of Prettier's public assets from a CDN.
使用例
- Quickly clean up a JSON or YAML file before pasting it into a config.
- Fix the indentation of a snippet from a forum or chat.
- Apply your project's style to one-off scripts without installing Node.
- Teach Prettier defaults to new team members.
よくある質問
- このオンラインコードフォーマッターはどのように機能しますか?
- このツールはPrettier 3をブラウザ内で直接実行します。言語を選択し、コードを貼り付けてフォーマットをクリックします。PrettierがコードをASTに解析し、一貫したスタイルで再出力します。言語プラグインはオンデマンドで読み込まれるため、ページは高速に保たれます。
- コードはサーバーにアップロードされますか?
- いいえ。Prettierはブラウザタブ内で完全に実行されます — コードがデバイスから出ることはありません。唯一のネットワークトラフィックはCDNからのPrettierのパブリックJavaScriptバンドルの一回限りのダウンロードです。
- どの言語とフォーマットに対応していますか?
- JavaScript、TypeScript、JSX/React、JSON、JSON5、CSS、SCSS、Less、HTML、Markdown、YAML、GraphQLに対応しています。これらはPrettierの公式プラグインであるため、出力はPrettier設定済みプロジェクトと同じものが得られます。
- このコードフォーマッターの一般的な使用例は何ですか?
- コンフィグに貼り付ける前のJSONやYAMLの素早い整形、フォーラムやチャットからのコードスニペットのインデント修正、Nodeをインストールせずに単発スクリプトにPrettierデフォルトを適用、ドキュメント共有前のコードスタイル統一に使用します。
- このコードフォーマッターは本当に無料で制限なしですか?
- はい、完全に無料です。サインアップ、ファイルサイズ制限、使用上限はありません。好きなだけファイルをフォーマットできます。このツールはオープンで広告サポートのみ — プレミアムティアは存在しません。