JavaScript Beautifier & Unminifier

Paste minified or messy code to make it readable again.

Runs on your device. Nothing you paste is uploaded.

Unminifying JavaScript

Minified code puts a whole library on one line. Beautifying re-adds line breaks and indentation so you can read it, step through it or diff two versions. It restores structure, not names: variables shortened to a, b, c stay short, and removed comments are gone. If the site publishes source maps (.js.map), your browser's developer tools can show the original source instead.

Also for JSON, CSS and HTML

Switch the language to format stylesheets and markup with the same engine (js-beautify). For JSON, the JSON formatter also validates and reports errors precisely; this tool formats anything JavaScript-like, including JSON with comments and JavaScript object literals.

Beautifying is safe: it only changes whitespace and line breaks (it adds semicolons nowhere and doesn't reorder anything), so the code behaves exactly as before. To compare two versions of a script after formatting them, paste both into the Diff Checker.

Is my data uploaded?

No. Formatting runs in your browser, so nothing you add is sent to gratistools.be. See the privacy page for details.