
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 on 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, you can get a local copy: the online JavaScript unminifier and the online CSS unminifier re-indent the code 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 choice, and when it is not
The minified JavaScript debugging guide is the deep dive. It covers 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 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, because they match what the tools actually do (js-beautify in the tab, indent size and spaces vs tabs, syntax check first).
Limitations:
What works:
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
In Chrome Sources, the {} Pretty Print control formats the file in place. In VS Code, run Format Document on a saved .min.js or .min.css. The same limit applies: 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 formatting settings, not a deobfuscator.
4Navigate with literals, not names
Search for unique strings, URLs, color tokens, and error messages. Follow if / return / @media patterns. Do not wait for a to become a real identifier.
Example:
Before (minified):
After (unminified):
You get a readable shape back, not the 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 an “expand to longhand” toolTwo concrete loops with the unminify pages
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.
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.
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 pasted text; the tool is working as intended.
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, because 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.
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.
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.
3. Rely on DevTools Styles for the final answer
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 and beautify share one formatter but serve different search intents
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 on disk and your team runs Prettier or the built-in language services, Format Document does the same kind of job. It changes whitespace, not symbols. Use FastMinify when the snippet lives in a ticket, a CDN response or on a machine without your editor profile. Neither path restores mangled names.
What to do next
Debug minified JS and CSS in this order. Use source maps if they exist. Use pretty-print in DevTools if you only need the crashing line. Use 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.
Maps missing, and you need indented JS or CSS locally? Format it in the browser, then go back to DevTools.
Related Articles

HTTP/2 and HTTP/3 change how files travel, not how big they are. Measured sizes, compile times and bundling tests show what minification still saves.

Convert a Unix epoch to a readable date and back, tell seconds from milliseconds, and avoid time zone, JWT and clock change traps, all in your browser.

Read a cron expression field by field, check its next runs in UTC or local time and avoid traps with steps, time zones and dialects, all in your browser.