
Unminify JS and CSS: Debug Minified Production Code
Unreadable traces, missing maps: recover readable JS and CSS in the browser with unminify and beautify — formatting only, mangled names stay lost.
When production JS and CSS are one unreadable line
A stack trace that points at app.min.js:1:18432, or a stylesheet that is a single 40 KB line, is a formatting problem first — not a decompiler problem. Minification removed whitespace and comments. Mangling (Terser mangle, cssnano identifier compression where enabled) renamed symbols. Pretty-print restores shape. Only a source map restores original names. When maps are missing and you need a local copy, the online JavaScript unminifier and the online CSS unminifier re-indent in the browser. They do not upload the payload. They do not undo mangling. For the JavaScript-only DevTools and source-map walkthrough, keep the earlier guide to debugging minified JavaScript open — this article is the tool-page workflow for JS and CSS.
When unminify is the right click — and when it is not
The minified JavaScript debugging guide is the deep dive: Chrome pretty-print, sourceMappingURL, hidden maps, and why a will never become getUserProfile without a map. This piece does not repeat that DevTools tour. It answers a different search: you already have a minified JS or CSS snippet (support ticket, CDN copy, theme file) and you want the FastMinify pages that format it. Sibling formatters live on the online unminify tools hub.
Unminify and beautify on FastMinify re-indent. They are not decompilers. Treat these limits as hard — they match what the tools actually do (js-beautify in the tab, indent size and spaces vs tabs, syntax check first).
Limitations:
What works:
Workflow: maps first, then pretty-print, then the tool pages
Walk this order. The unminify JavaScript and unminify CSS pages are step 3, when maps are missing and you need a formatted copy.
1Look for a source map
In DevTools → Sources, check for original files next to the bundle, a .map sibling, or a //# sourceMappingURL= comment (JS) / /*# sourceMappingURL= (CSS). If a map loads, debug there and stop. Formatters cannot beat original names.
2Pretty-print in the browser or editor
Chrome Sources: the {} Pretty Print control formats the file in place. VS Code: Format Document on a saved .min.js or .min.css. Same limit: names stay mangled. For CSS cascade bugs, pretty-print plus the Styles pane often beats copying the file out.
3Unminify locally only if you need a file copy
No map, and you want indented source on disk or in a ticket: paste JS into unminify JavaScript or CSS into unminify CSS. Processing stays in the browser. Indent size and character are format knobs — not a deobfuscator.
4Navigate with literals, not names
Search for unique strings, URLs, colour tokens, and error messages. Follow if / return / @media patterns. Do not wait for a to become a real identifier.
Example:
Before (minified):
After (unminified):
What you get back: readable shape, not original source
Paste a one-line IIFE or a Terser bundle slice. The JavaScript unminifier runs js-beautify in the browser after a syntax check. You get wrapping and indent. You do not get the pre-mangle names. The !0 in the example is deliberate: many minifiers rewrite true that way, and formatting will not turn it back into true.
Before
After
{}, stay on the JS debugging guideCompressed CSS is usually one line with selectors jammed together. The CSS unminifier formats with js-beautify: selectors on their own lines, declarations indented, @media blocks nested visually. Specificity and cascade do not change — only whitespace. If a rule “disappears” after format, it was already not applying; formatting did not delete it.
Before
After
.9 stay short; this is not a “expand to longhand” toolUsing the unminify pages: two concrete loops
Open the JavaScript unminifier. Paste a single snippet (a function, a webpack chunk, a bookmarklet). Click Unminify. Output is indented in the right pane. Copy it into your editor and search for a unique string from the stack trace. Everything stays in the tab.
Step 1: copy the crashing file, not the HTML page
From DevTools → Network or Sources, save the .js that the trace names. Pasting the whole HTML document into a JS unminifier will fail the syntax check.
Step 2: paste into unminify-js
Leave indent on 2 spaces unless your team uses tabs. If you see a syntax error, the paste is truncated or mixed with HTML — fix the paste, do not lower the tool’s standards.
Step 3: search literals, then go back to DevTools
Find the error message or URL. Note the surrounding control flow. Pretty-print the live file in Chrome if you still need breakpoints — a formatted copy on disk does not replace a paused call stack.
Open the CSS unminifier. Paste the compressed sheet (or the slice that contains the selector). After format, search for the class from the DOM. Compare with DevTools Computed styles: formatting does not change which rule wins.
Step 1: copy the stylesheet, not the minified HTML
Network panel → the .css request. Inline <style> blocks can be pasted too if they are valid CSS only.
Step 2: unminify, then search the class or id
A selector list such as .btn,.cta splits onto two lines. That is readability, not a cascade change.
Step 3: keep DevTools Styles for the truth
The formatted file tells you what was shipped. The Styles pane tells you what actually applied (overrides, layers, !important). Use both.
On both unminify pages, indent size and indent character are the format controls. Minify ignores them. There is no “restore original names” switch. For the rest of the family (HTML, JSON, XML), see the unminify tools hub.
Unminify vs beautify: same formatter, different search intent
On FastMinify, unminify JavaScript and beautify JavaScript both format with js-beautify after a syntax check. The same pairing exists for CSS: unminify CSS and CSS beautifier online. The split is intent, not a second algorithm. Unminify URLs target compressed production output. Beautify URLs target source you already consider readable but want consistently indented. The longer tour of formatters is the code beautifier guide.
If the file is already on disk and your team runs Prettier or the built-in JS/CSS language services, Format Document is the same class of operation: whitespace, not symbols. Use FastMinify when the snippet lives in a ticket, a CDN response, or a machine without your editor profile. Neither path restores mangled names.
What to do next
Debug minified JS and CSS in this order: source maps if they exist, pretty-print in DevTools if you only need the crashing line, and a browser unminifier only when you need a formatted copy and maps are missing. FastMinify’s unminify and beautify pages re-indent with js-beautify; they do not undo mangling. For the Chrome and map deep dive, keep the JavaScript debugging guide. For day-to-day formatting of readable source, use the beautify URLs.
Related Articles

Unserialize WordPress `wp_postmeta`, PHP sessions and Laravel caches to readable JSON in the browser — arrays and scalars only, no local script.

Stages, includes, `rules:`: structurally validate a .gitlab-ci.yml before the pipeline runs — not a GitLab runner, not official CI Lint.

Broken YAML, missing `on` or `jobs`, empty steps: structurally validate workflows before you push — and keep actionlint in CI.