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.

Frequently asked questions

Does it handle TypeScript and JSX?

Yes — modern JS (ES2023+), TypeScript, and JSX are all supported.

Can it minify as well as beautify?

Yes — or use the dedicated JS minifier for the shrink direction.

Should I use this to bundle for production?

No — for production use esbuild, swc, or terser; this is for ad-hoc readable output from a minified snippet.

How do I format React JSX specifically?

Use the JSX prettifier, which wraps attributes and handles JSX/TSX layout.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: