PrivTab

JavaScript 整形

JavaScript を整形

ブラウザで動作 · アップロード不要

このツールとページ内の説明は、現在は英語のみです。動作は同じで、すべてブラウザ内で実行されます。

  • 何も端末から出ません
  • サーバーによるサイズ制限なし
  • 登録不要・透かしなし
  • 無料

How to format JavaScript

  1. Paste your code, open a .js file, or try the example.
  2. Choose the indentation and where braces go.
  3. Copy or download the formatted code.

Good to know

  • Only spacing and line breaks change; the code does exactly the same thing.
  • Short variable names from a minifier stay short: formatting can't bring back the original names.
  • The formatter doesn't check for errors. Code with a syntax error is formatted as well as possible.
  • Formatting is done by js-beautify, a widely used open-source formatter.

よくある質問

Does it work for JSON and TypeScript?

JSON, yes (the JSON Formatter also checks it). TypeScript mostly formats fine, but type syntax isn't fully understood.

Is my code uploaded?

No. Everything happens in your browser, and the page is blocked from uploading anything.