Beautify
Format JavaScript, CSS, HTML, and JSON in your browser and unpack packed code without running it — your entry point to the manual, examples, and tips.
Minified code, made readable again
Beautify takes compressed, single-line, or deliberately obscured source code and returns it cleanly indented and formatted. You know the situation: a min.js from a build, a CSS blob pulled from the DevTools inspector, or an HTML fragment without a single line break — all technically correct, but nearly impossible for a human to read. Beautify reverses that.
You paste the code into the editor, click Beautify (or press Ctrl+Enter), and get formatted code back — right in the same editor, ready to copy or download. The tool detects the language automatically, JSON included; you can also pin it to JavaScript, CSS, or HTML when needed. Don't like the result? In the code editor, Ctrl+Z brings back the unformatted code in a single step.
Beautify is built for everyone who works with someone else's or shipped code: developers who need to make sense of a minified production file; frontend people who want copied CSS or HTML in a consistent shape; and anyone who has to make a snippet from a console, a bug report, or a library readable before working with it.
What Beautify does
The features fall into three groups:
- Formatting — JavaScript, CSS, and HTML are re-indented and wrapped. The options control indentation (a tab or 2, 3, 4, or 8 spaces, 4 by default), allowed blank lines, line-wrap length, brace style, and eleven toggles such as "Comma-first style", "Break chained methods", or "Keep array indent". All of these options come straight from the js-beautify library.
- Unpacking and deobfuscation — with the Detect packers option, the tool recognizes two common packing schemes and unpacks them before formatting: the classic P.A.C.K.E.R. format (
eval(function(p,a,c,k,e,d)…) and URL-encoded code. This is pattern-based and happens without running the packed code — the unpacker only decodes the symbol table. There's no AI involved, just the reversal of known packing schemes. - Input/output — upload a file at the click of a button (
.js,.css,.html,.json, and more), copy the result to the clipboard, or download it as a file (in the code editor, Ctrl+S works too). The editor (ACE with the Dracula color scheme) brings syntax highlighting and line numbers; you can switch to a plain text field if you prefer. Your code and settings survive a page reload.
JSON and JSONP are handled by the JavaScript formatter — valid JSON is valid JavaScript, so it gets indented cleanly, and auto-detection recognizes it on its own. That isn't a dedicated JSON validator, though; for that there's the JSON Editor.
Architecture and privacy
Beautify runs entirely in your browser. The code you paste or upload is not sent to any server — the formatting and unpacking are done by JavaScript libraries (js-beautify and the unpackers) locally on your machine. File uploads are read locally too. That makes the tool safe for proprietary or confidential code: it never leaves your browser.
So nothing gets lost on a reload, Beautify keeps the editor content and all options in your browser's local storage (localStorage). That stays on your machine as well — Clear empties the editor and, with it, the stored code.
Try it now
→ Open Beautify — paste code, click Beautify (or Ctrl+Enter), copy the formatted result. No account, free, right in the browser.
Related JPKCom tools
Beautify formats — these tools cover the neighboring tasks:
- Compiler — the opposite direction: minify (and beautify) HTML, JavaScript, and CSS, and compile SCSS and Sass to CSS. Beautify itself points to it right below the editor.
- Coder — encode and decode HTML entities, URLs, Base64, JWT, and Data URIs before you run the plain text through Beautify.
- Source — fetch a page's source code so you can make it readable here.
There's more on the subpages: the manual with every option in detail, hands-on examples, and a collection of tips & tricks.