JavaScript Beautifier / Minifier
Beautify minified JavaScript into readable code, or minify formatted JS for production. Handles modern syntax (ES2023+ features, optional chaining, nullish coalescing, top-level await), JSX, and TypeScript.
How to use the JavaScript Beautifier / Minifier
Paste JavaScript. Beautify produces indented, line-broken output with consistent spacing. Minify strips whitespace and comments for production. For real production bundling use esbuild, swc, or terser — this is for ad-hoc work where you just need readable code from a minified snippet.
Beautifying and minifying JavaScript
Minified JavaScript — the kind you get from a production bundle, a CDN-hosted library, or a copied snippet — collapses everything onto a few long lines with single-character variable names and no spacing, which makes it nearly impossible to follow when you are trying to understand what a script does or where it breaks.
This beautifies JavaScript back into indented, evenly spaced code, and can also minify formatted source the other way, handling modern syntax (ES2023+, optional chaining, nullish coalescing, top-level await), JSX, and TypeScript. For a minify-only pass there is the dedicated JS minifier, and for React markup specifically the JSX prettifier formats JSX/TSX with attribute wrapping. For real production bundling, reach for esbuild, swc, or terser instead.
Common use cases
- Read a bundled script — beautify minified JS from a production build.
- Inspect a library — expand a CDN-hosted file to follow its logic.
- Debug a snippet — format copied code to find the problem.
- Normalise quotes — standardise on single or double quotes.
- Quick minify — shrink a small script for an ad-hoc test.