JavaScript Formatter & Beautifier
Paste a script or a minified bundle fragment. Prettier’s Babel parser reprints it with consistent indentation. Minify collapses line breaks after a successful parse — it is not a full compressor.
Tool input stays in your browserDid you know · History
The Unix philosophy of small composable tools joined by pipes was written down by Doug McIlroy in 1978.
JavaScript input
you edit—Formatted JavaScript
read only—A real JS parser
Format uses Prettier with the Babel parser, the same family of tooling as the HTML and CSS pages. Syntax errors are reported instead of silently mangling the file. TypeScript, JSX, and Flow are outside this page — paste plain JavaScript.
Minify is compact, not terser
Minify still has to parse. It then prints with an unbounded line width and joins remaining breaks. Names are not mangled and dead code is not dropped. Use a bundler when you need production compression.
Source stays local
Unpublished application code is exactly the kind of paste that should never hit a format API. This page runs entirely in the browser bundle.
JavaScript formatter FAQ
JS beautifier, pretty-print JavaScript, minify JS in the browser, and Prettier vs terser.
What is a JavaScript formatter?
A JavaScript formatter pretty-prints JS with consistent quotes, semicolons, and indentation. This JS beautifier uses Prettier’s Babel parser in the browser.
How do I beautify minified JavaScript?
Paste the script, choose Format, and copy the reprinted source. If the parser rejects the input, you get the syntax error instead of a half-rewritten file.
Is this a JavaScript minifier like terser?
No. Minify here parses with Prettier then collapses line breaks. It does not mangle names or drop dead code. Use a bundler for production compression.
Does the JS formatter upload my code?
No. Formatting runs in this tab. Unpublished application code is not sent anywhere.