LFUnminify, online code unminifier by Ludovic Frank
EN

Unminify and beautify your code online

Paste minified JavaScript, CSS, HTML, XML or JSON and get readable, properly indented code back. Free, instant, and processed entirely in your browser.

Your unminified, beautified code will appear here

Unminify a specific format

Each format has its own page, with the details that matter for that language:

What is code minification?

Developers write code for other developers. That means comments, indentation, blank lines between blocks, and variable names that actually say what they hold. All of it helps humans, and none of it helps the browser. Minification is the build step that removes everything a machine does not need: whitespace, line breaks, comments, and very often the original variable and function names, which get rewritten as single letters. The behaviour of the program stays strictly identical, only its shape changes.

The payoff is real. A minified JavaScript bundle is routinely 30 to 70 percent smaller than its source, which means fewer bytes over the network, a faster first render, and healthier Core Web Vitals. That is why almost every production site serves minified JS, CSS and HTML. The cost is that the file you download from a live website is one dense line that nobody can read. When you need to understand that file, debug it, or audit what it really does, you have to unminify it first.

What does this unminify tool do?

LFUnminify takes minified code and rebuilds a readable structure around it. It restores indentation, puts every statement back on its own line, spaces out blocks and operators, and applies consistent formatting rules for the language it detected. A four thousand character single line bundle becomes a few hundred properly nested lines that you can scroll through, search, and reason about.

Under the hood it runs Prettier, the formatter most JavaScript teams already use, directly inside your browser. The output therefore matches what your own editor would produce on a normal source file, so the result feels familiar instead of machine generated. Detection is automatic: paste anything and the tool works out whether it is JavaScript, CSS, HTML, XML or JSON before formatting it accordingly.

One honest limit is worth stating up front. Unminifying is not decompiling. Comments, original variable names and developer notes were deleted at build time, and no tool on earth can bring them back. What you get is well structured, readable, navigable code with the minifier's short names still in place. In practice that is enough to follow the logic, locate a function, or spot what a script is sending and where.

Supported code formats

One editor, five languages. LFUnminify reads the content you paste, works out which language it is, then hands it to the parser built for that syntax. You never have to pick a format from a menu, and a file with the wrong extension is still handled correctly:

  • JavaScript, including ES6 and later syntax, modules, async code and JSX. The usual case: a bundle produced by webpack, Vite, esbuild or Terser.
  • CSS, including modern syntax, custom properties, media queries and nested rules. Ideal for a stylesheet compiled by Tailwind, Sass or PostCSS.
  • HTML, including inline script and style blocks, which are formatted along with the markup rather than left as one long line.
  • XML, including sitemaps, RSS feeds, SVG files, SOAP envelopes and configuration files that arrived without a single line break.
  • JSON, including deeply nested API responses, package manifests, configuration files and log payloads.

When you need a code unminifier

Unminifying is rarely about curiosity. It is usually the fastest way to answer a concrete question about code you did not write, or code you wrote but can no longer read:

  • Debugging a production bug. The stack trace points at line 1, column 24815 of a bundle. Formatting the file gives you real line numbers and lets you find the function that actually threw.
  • Auditing a third party script. Before you drop an analytics tag, a chat widget or an affiliate script into your site, unminify it and read what it collects, which domains it contacts, and what it writes to storage.
  • Reading a compiled stylesheet. Utility frameworks output enormous single line CSS files. Beautifying one lets you see the cascade, find the rule that is winning, and understand why your override is ignored.
  • Inspecting an API response. A JSON payload copied from the network tab is unreadable until it is formatted. Once beautified, the structure, the nesting and the missing field become obvious in seconds.
  • Learning from real code. Reading how a well built library actually solves a problem is a fast way to improve, and a formatted file is the only way to read one comfortably.

How to use LFUnminify

There are three ways to get code into the editor. Paste it straight into the left panel, click Browse to import a file from your machine, or drag and drop a file onto the input area. You can also click Load from URL and give the tool a direct link to a .js, .css, .html, .xml or .json file, which is handy when you want to inspect an asset served by a live site.

Formatting starts on its own, there is no button to hunt for. The tool waits until you stop typing, detects the language, then prints the beautified result in the right panel with syntax highlighting. From there you can copy the whole output to your clipboard in one click, or download it as a properly named file so you can open it in your editor.

Two small things that help on long files. Turn on line numbers when you need to reference a precise position or compare two versions side by side, the preference is remembered for your next visit. And if the detected format is not the one you expected, that is usually a clue in itself: a file that parses as JavaScript when you thought it was JSON often turns out to be a JSONP response or a config wrapped in an assignment.

Your code never leaves your machine

This matters enough to be explicit. Formatting happens locally, in your browser, using JavaScript loaded once with the page. Your code is not uploaded, not queued on a server, not written to a database, and not logged anywhere. You can disconnect from the network after the page has loaded and the unminifier keeps working, which is the simplest proof that nothing is being sent.

That means you can safely paste proprietary code, an internal bundle, a client project or a config file that contains structure you would rather not share. The only moment a request leaves your browser is when you explicitly ask the tool to load a URL, and even then the fetched file is formatted on your device. There is no account to create and no tracking of the content you paste.

Why is LFUnminify free?

LFUnminify belongs to a family of free tools built by Ludovic Frank, alongside a password generator, a favicon generator, a color palette builder and a few others. The reasoning is simple: the small utilities developers reach for several times a week should not sit behind a signup form, an ad wall or a credit limit. This one has no account, no quota and no upsell inside the product.

It is also a working demonstration. Every tool in the family is a real application, built and maintained the way client projects are built, which says more about how we work than a portfolio page ever could. If you need custom web development, a serious application rather than a template, or technical consulting, the link in the footer is where to find us.

Frequently asked questions

Can I recover the original source code from a minified file?

Not entirely, and be wary of any tool that claims otherwise. Minification permanently deletes comments and usually renames variables to single letters, so that information no longer exists in the file. LFUnminify restores structure, indentation and line breaks, which makes the code readable and navigable again, but it cannot reinvent names or comments that were thrown away at build time. If a source map is published alongside the bundle, that is the only way to get the true original back.

Is my code sent to a server?

No. The formatting runs entirely in your browser with JavaScript that was loaded together with the page. Nothing is uploaded, stored or logged. The single exception is the Load from URL feature, which asks our server to fetch the file you named because browsers block cross origin requests, and even in that case the code you get back is formatted locally on your device.

Which formats are supported?

JavaScript, CSS, HTML, XML and JSON. The format is detected automatically from the content, so you do not have to choose one, and each language is handled by the parser designed for it. JavaScript covers modern syntax including ES modules and JSX, CSS covers custom properties and nested rules, and XML covers everything from sitemaps and RSS feeds to SVG files.

Is there a size limit?

There is no hard limit on pasted content, though very large files take longer because the work happens on your own processor rather than on a server. Bundles of a few megabytes are formatted comfortably on a normal laptop. Files loaded through the URL feature are capped at 10 megabytes to keep the fetch responsive.

What is the difference between unminifying and beautifying?

In practice the two words describe the same operation, and this tool does both at once. Unminify usually refers to undoing a build step that compressed the file, while beautify refers to reformatting any code, minified or not, according to consistent style rules. Because LFUnminify runs Prettier on the input, you can also use it to clean up badly indented code that was never minified in the first place.

Can I use it on obfuscated JavaScript?

You can format it, and that is often a useful first step, but formatting is not deobfuscation. Obfuscators go further than minifiers by encoding strings, splitting control flow and adding dead code on purpose. Beautifying such a file gives you a readable structure to work with, which makes the logic easier to follow, but the intentional misdirection stays in place.