JavaScript Unminifier

Expand minified JS back into clean, readable source.

Processed locally — nothing is uploaded

About Code Formatter

Useful for making a minified payload readable again, for checking that a config parses before you ship it, or for stripping a file down for production. Switching language keeps whatever you have already pasted.

Expand a one-line, minified JavaScript bundle back into properly indented, readable source so you can inspect or debug it. The beautifier re-formats the code in your browser without sending it to any server.

Paste messy or minified code and instantly beautify, minify or validate JSON, HTML, CSS, SQL, XML and YAML. Beautifying re-indents your source with consistent spacing so it is easy to read and review; minifying strips whitespace and comments to ship smaller files; validating surfaces syntax errors with the exact location so you can fix them fast.

It also doubles as a converter between common data formats — JSON to CSV, CSV to JSON, YAML to JSON and back — which is handy when wiring up APIs, configs or spreadsheets. Converting is where structure mismatches surface: CSV has no nesting, so a nested JSON object has to be flattened or dropped.

Learn how this works

Frequently asked questions

Will this recover my original variable names?

No. Beautifying restores indentation and line breaks so the structure is readable, but minifiers rename variables destructively — `userAccountBalance` became `a` and that mapping is gone. Only a source map can recover the original names.

Is it safe to paste a third-party bundle here?

The code is only ever formatted as text, never executed, and nothing is uploaded — the beautifier runs in your browser. That makes it safe for inspecting a vendor script you do not yet trust.

Why does the output still look confusing?

Because minification is more than whitespace removal: it inlines functions, collapses conditionals into ternaries and comma expressions, and mangles names. Formatting fixes the layout, but the transformed logic remains. Read it alongside a source map where one exists.

Pro Tips

  • Paste unformatted JSON, HTML, CSS, or SQL code and apply consistent indentation (2, 4, or tab spaces) in one click.
  • Use minification toggle to reduce code size by 30-50% for production deployment or email constraints.
  • Export formatted code directly to clipboard to paste into documentation, emails, or config files instantly.
  • Compare formatted vs minified side-by-side to verify code compression doesn't break syntax.

Common Use Cases

  • Reading a minified vendor script to work out what it does before shipping it
  • Locating the line a production stack trace points at when no source map is published
  • Reviewing a bundled snippet a third party asked you to embed

How It Compares

While Prettier and VS Code extensions require installation and configuration, our web-based formatter works instantly on any device without setup, offering broader language support (HTML, CSS, SQL) in a single tool compared to language-specific formatters like Beautifier.io.

More Code Formatter tools

Related tools