Beautify

Format, unpack, and deobfuscate JavaScript, CSS, and HTML right in your browser — your starting point for the manual, examples, and tips on Beautify.

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; you can also pin it to JavaScript, CSS, or HTML when needed.

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 (tabs or 2 to 8 spaces), allowed blank lines, line-wrap length, brace style, and eleven detail toggles such as comma-first, break chained methods, or keep array indent.
  • Unpacking and deobfuscation — with the Detect packers option, the tool recognizes common JavaScript packers and unpacks them before formatting: the classic P.A.C.K.E.R. format (eval(function(p,a,c,k,e,d)…), URL-encoded code, and MyObfuscate. This is pattern-based — 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. The editor (CodeMirror) brings syntax highlighting and line numbers; you can switch to a plain text field if you prefer.

JSON and JSONP are handled by the JavaScript formatter — valid JSON is valid JavaScript, so it gets indented cleanly. That isn't a dedicated JSON validator, though; for that there's the JSON Editor tool.

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.

Try it now

→ Open Beautify — paste code, click Beautify (or Ctrl+Enter), copy the formatted result. No account, free, right in the browser.

Beautify formats — these tools cover the neighboring tasks:

  • Compiler — the opposite direction: minify (and beautify) HTML, JavaScript, and CSS, and compile SASS/SCSS to CSS.
  • 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.