Paste minified or untidy JavaScript and get it back indented and readable.
Unminifying brings back the line breaks, the indentation and the structure. It cannot bring back the original names: the minifier renamed them to e, t and n and threw the mapping away, so only a source map can restore them.
How It Works
Put minified, obfuscated or just untidy JavaScript into the left pane, or drop a .js file onto it. The sample loaded for you is a real minified widget squashed onto one line.
Set the indent size or switch to tabs, pick a brace style, cap the blank lines, wrap long lines at a column, and add a space before function parentheses if that is your house style. The readable version updates as you change options.
Copy the formatted script, download it as formatted.js, or publish it on a share page that shows the code as text. No account is needed for the 30-minute link, and claiming it is free.
About This Tool
It takes a script that has been squashed onto one enormous line and gives it back with real line breaks, indentation and structure, so you can actually read it.
Minified JavaScript is the normal way scripts are shipped: a build step strips every space, newline and comment and renames every variable to a single letter, because the file only has to run, not be read. That is fine until you need to read it. Paste it here and this JavaScript formatter walks the code, works out where each function, block, object and statement begins and ends, and writes it back out one statement per line with everything nested properly. A 3 KB blob that looked like one paragraph of noise becomes eighty lines you can scroll, search and follow.
Anyone holding a script they did not write. Someone checking what a widget or tracking snippet on their site actually does before pasting it into a page. Someone who has been handed a theme, a plugin or a downloaded file and needs to find the bit that sets a colour. Someone who asked an AI for a script, pasted it half-edited, and now has three different indentation styles in one file. Learners use a JavaScript beautifier to see how a library is put together; developers use one to diff two versions of a file that were built with different settings.
Everything happens in your browser, on the same open-source engine behind the “format document” command in many code editors. Your script is never sent to a server while you format it. As a safety net, the tool also asks your browser’s own JavaScript engine to parse the code and reports the error if there is one, so a missing brace shows up as a warning instead of quietly producing nonsense. That check compiles the source, it never runs it.
This is the part other tools skip. When you unminify JavaScript you get the whitespace back, not the meaning. The minifier renamed cookieName to e and deleted every comment, and that mapping is gone unless the original source map still exists. Expect readable structure with cryptic names, not the original file. A formatter also does not fix broken code or undo real obfuscation, and heavily obfuscated scripts stay hard to follow even when perfectly indented. When you are ready to ship the file again, the JavaScript minifier squeezes it back down, and the HTML formatter does the same job for the markup around it.
A script on its own is not a web page, so the publish button below wraps your formatted code in a small page that shows it as text – nothing is executed – and puts it on a free OxyPages subdomain with HTTPS, with no account. Send a colleague the link instead of an attachment they have to open. The link lasts 30 minutes; claiming it is free and keeps it permanently, with your own address and, on paid plans, a custom domain. See how it works or compare plans.
Questions
More Free Tools
Every tool here runs in your browser and ends the same way: one click and your HTML is on a live link.
Minify JavaScript with a real compressor: shorten names, drop comments and dead code, and see the bytes saved. Runs in your browser, nothing is uploaded.
Tidy minified or messy CSS with consistent indentation, one rule per line and sorted braces. Runs in your browser. Copy or download the result.
Clean up messy or minified HTML with proper indentation in one click. Runs in your browser, nothing is uploaded. Publish the result as a live page.
Try It Now
Still Here? Drop It In.
The whole pitch fits in one sentence: your HTML, on a link, in seconds.
Drag and drop your HTML file(s), folders, or ZIP file
or ·
No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.