Skip to content
MixTool

JavaScript beautifier

Unminify and format JavaScript so you can read it, debug it and understand what it does.

  • Runs entirely in your browser
  • Free · no sign-up
  • Works on phone and desktop
Loading tool…

Make minified JavaScript readable

Production JavaScript is squeezed onto a handful of lines. Paste it here and the beautifier restores indentation, line breaks and spacing, so functions, conditions and loops are laid out clearly. It understands modern syntax: arrow functions, classes, template literals, async/await, optional chaining and modules.

The code is also run through a syntax check, so a missing bracket or stray character is reported before you waste time on it. Choose your indent size and brace style, then copy or download the result.

How to beautify JavaScript

  1. 1

    Paste the code

    Minified or just messy.

  2. 2

    Set the options

    Indent size and brace style.

  3. 3

    Check the syntax result

    Errors are reported with a location.

  4. 4

    Copy or download

    Save as a .js file.

Key features

  • Modern JavaScript

    ES modules, classes, async/await and more.

  • Syntax check

    Catches errors before you run the code.

  • Configurable style

    Indentation and brace placement.

  • Private

    Code never leaves your browser.

Common uses

  • Debugging production bugs: Read the minified bundle a browser actually loaded.
  • Auditing third-party scripts: See what an embedded widget or tag really does.
  • Cleaning up snippets: Format code copied from chats and forums.

Tips and good to know

  • Variable names shortened by a minifier (like a or t) can't be restored. Source maps are the only way to recover the originals.
  • To shrink code for production, use the JS Minifier.

Frequently asked questions

Can it restore original variable names?

No. Minifiers throw away the original names, so the beautified code keeps the short ones. Only a source map can map them back.

Does it work with TypeScript or JSX?

Formatting works for most JSX and TypeScript, but the syntax check expects plain JavaScript, so type annotations may be flagged.

Is it safe to paste private code?

Yes. Everything runs locally and nothing is uploaded or stored.