JavaScript Formatter and Beautifier
Beautify minified or unformatted JavaScript with Prettier, including modern syntax and JSX. Free, instant and entirely in-browser.
Input
Result
The result appears here as you type.
What this tool is for
Reading a minified bundle is possible once it has line breaks and indentation. This runs Prettier in your browser, so modern syntax, JSX and TypeScript-flavoured code all format correctly rather than confusing an older parser.
How to use it
- Paste the JavaScript or drop a .js file.
- Set indentation and quote style.
- Copy the formatted code.
Frequently asked questions
Can it recover the original variable names?
No. Minification replaces names with single letters and that information is gone unless a source map exists. Formatting restores structure, not meaning.