OxyPages

JavaScript Formatter, Beautifier And Unminifier

Paste minified or untidy JavaScript and get it back indented and readable.

Free. No account. Live in seconds.
Minified or messy JavaScript
Formatted
In: 2 lines, 2.4 KBOut: 0 lines, 0 B

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.

Your formatted script on a page, shown as text and never run. Free. No account.

How It Works

How To Use The JavaScript Formatter

  1. 1

    Paste Or Drop Your JavaScript

    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.

  2. 2

    Choose How It Should Look

    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.

  3. 3

    Copy, Download Or Publish

    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

What This JavaScript Formatter Does

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.

Who It Is For

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.

How It Works

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.

What It Cannot Give Back

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.

Then Put It On A Link

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

Frequently Asked Questions

Yes. The formatter runs in your browser and your script never leaves your device while you format it. Copying and downloading are local too. Nothing is sent to OxyPages unless you press the publish button.

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.

  • No Account Needed
  • Free SSL
  • 30-Minute Unclaimed Link, Claim To Keep It