JavaScript Beautifier

Quickly re-indent and prettify JavaScript and TypeScript.

Paste minified or single-line JavaScript / TypeScript and get a readable version with proper indentation. Not a full Prettier replacement — but perfect for making one-off snippets, copied bookmarklets or bundled output skimmable.

Common use cases

  • Make minified library output readable for a quick sanity check
  • Re-indent code pasted from random web tutorials and gists
  • Format bookmarklet or one-liner code before saving
  • Inspect bundled JS chunks to find a function during debugging

Frequently asked questions

How does this compare to Prettier?
It's a lightweight whitespace-only beautifier. Prettier rewrites code following a strict style guide and respects language semantics; this tool just adds indentation and newlines for readability.
Will it break minified code with single-letter variables?
No — variable names are unchanged. Only whitespace, newlines and indentation are added.
Does it support TypeScript and JSX?
Yes for TS — the formatting rules are the same. JSX may not always indent perfectly because angle-bracket syntax differs from plain JS expressions.

Related tools