JavaScript フォーマッター
「JavaScript フォーマッター」はコード、データと QRに使えるブラウザツールです。入力内容と結果は通常この端末内で処理され、登録は必要ありません。
LOCAL JAVASCRIPT FORMATTING
Make JavaScript easier to read
Format source text in your browser. The page never evaluates or uploads the code.
Up to 100,000 characters. Input is treated as text only.
Review the text before using it in a project.
Limits: 100,000 input characters. Formatting is text-only and does not parse, import, evaluate, or execute JavaScript.
使い方
使い方
- Paste JavaScript up to 100,000 characters.
- Choose two or four spaces, then format the source.
- Review the formatted text and copy or download it.
Token-aware formatting
Strings, template literals, regular expressions, comments, and escaped characters are kept intact while punctuation and braces receive consistent spacing and indentation.
Local and bounded
Formatting happens entirely in your browser. Input is limited to 100,000 characters and the page treats the source as text, so it never imports, evaluates, or executes your code.
よくある質問
あわせて知りたいこと
Does this run my JavaScript?
No. The page only scans source text and produces formatted text locally.
Are strings and comments preserved?
Yes. Quoted strings, template literals, regular expression literals, line comments, and block comments are kept as tokens.
Does this validate JavaScript?
It provides formatting help but is not a full parser or linter. Review the output in your normal development tools.
Can I format TypeScript?
The token formatter works best with JavaScript-like syntax, but it does not type-check or transform TypeScript.