JustUtils
Runs locally in your browser

Unminify JavaScript Online

Turn compressed JavaScript into consistently indented code for reading and debugging—without executing it or uploading it.

1. Add JavaScript

Paste code or import one file. Maximum size: 2 MB.

0 B

Shortcut: Ctrl/⌘ + Enter · Code is parsed, never executed.

Readable structure, honest limits

Beautify minified JavaScript without pretending to reverse history.

Unminifying makes compressed JavaScript easier to inspect by parsing it and printing a consistent layout. It is valuable for debugging a deployed file, reviewing a small third-party script, or learning how control flow is nested. Formatting exposes structure; it does not reconstruct information the minifier deleted.

  1. 01

    Paste complete JS

    Use the full JavaScript file when possible. A cut-off function, string, template literal, or comment cannot be parsed.

  2. 02

    Unminify safely

    The parser reads the code without executing it, then adds consistent whitespace, indentation, and line breaks.

  3. 03

    Debug with context

    Search the formatted result for a known function, URL, event, or error, and use source maps when originals are available.

Worked examples

These small examples show the exact transformation, including the characters that are easy to overlook.

Reveal nested control flow

Input
function status(e){return e?.active?e.role==="admin"?"ready":"limited":"offline"}
Result
function status(e) { return e?.active ? e.role === "admin" ? "ready" : "limited" : "offline"; }

Indentation and spacing make the function boundary and conditional expression visible, while the short parameter name remains unchanged.

Understand what cannot return

Input
const t=(t=>2*t);console.log(t(4));
Result
const t = (t => 2 * t); console.log(t(4));

The formatter can separate statements, but it cannot know whether either t was originally named double, value, number, or something else.

Understand the format

A formatter restores layout; a source map restores connections.

Minification is lossy. Many different original programs can produce the same compact output after comments, whitespace, and descriptive local names are removed. An unminifier can choose a readable layout, but there is no unique original layout to recover.

A source map is a separate metadata file created during a build. It maps locations in a deployed bundle back to original filenames, lines, columns, and sometimes embedded source content. If debugging production code is the goal, obtain the exact source map matching that exact minified file.

Deobfuscation is also different. Obfuscators may add confusing control flow, encoded strings, anti-debugging behavior, or runtime-generated code. Pretty-printing can help the first inspection, but it does not automatically explain or safely undo those transformations.

Useful for

  • Reading the control flow of a minified production error when no source view is immediately available.
  • Finding URLs, selectors, event names, or recognizable function calls in a compact script.
  • Checking whether copied JavaScript is complete and syntactically readable by the parser.

Check before you copy

  • Do not execute unknown code just because it has been formatted; readable code can still be malicious.
  • Do not assume short names can be accurately renamed without understanding their behavior and scope.
  • Verify the code's license and your authorization before copying, changing, or redistributing it.
  • Use browser developer tools and matching source maps for serious production debugging.

Common questions

Answers for first-time users

What does unminify mean?

Unminifying, beautifying, and pretty-printing usually mean adding consistent indentation, spaces, and line breaks to compressed code so its structure is easier to read.

Can unminifying recover the original source code?

No. It cannot recreate removed comments, original variable names, TypeScript types, JSX, separate source files, or the author's exact formatting. A source map and the matching deployed file are needed for a closer link to original sources.

Does this page run the JavaScript I paste?

No. It parses and prints the code but does not evaluate it. The work happens locally in your browser and the input is not uploaded by this tool.

Why does the output still have one-letter variable names?

A minifier may replace descriptive local names with short identifiers such as a, b, and c. Formatting can reveal scope and control flow, but it has no reliable record of what those names used to be.

Why does the unminifier report a syntax error?

The input may be truncated, copied from inside an HTML script incorrectly, written in JSX or TypeScript, or depend on syntax the parser cannot read. Start at the reported line and column and check whether the complete .js file was copied.

Can I use unminified third-party code?

Formatting does not change ownership or license terms. You may inspect code you are authorized to access, but copying, modifying, or redistributing it still depends on its license and applicable law.