JavaScript Formatter
Indent minified or crowded JavaScript without moving a single token.
- Privacy
- This tool runs in your browser. Nothing you enter is sent to Wayfind.
- Filed under
- Filed under
Indent minified or crowded JavaScript without moving a single token.
It only changes whitespace, and checks that it did: the result is read back token by token and must match your code, or no result is shown. No semicolon is inserted, and a line break that ends a statement, such as one right after return, is kept, so code that relies on automatic semicolon insertion keeps behaving the same. Strings, template literals and regular expressions are copied through untouched.
Yes, and it is the usual reason to use it: a one-line bundle becomes readable. Names that the minifier shortened stay short, because the original names are not in the file any more.
Classes with private fields, optional chaining, nullish coalescing, async generators and import and export statements are all indented as the structures they are. It formats JavaScript: TypeScript type annotations are treated as ordinary expressions, and JSX is usually reported as code it cannot read.
No. It is formatted in this browser tab, in a background worker, and never leaves your device.