JS Beautifier

Expand minified JavaScript into indented, readable code without uploading anything.

The output will appear here.

How JS Beautifier works

Expand minified JavaScript into indented, readable code without uploading anything.

Input JavaScript
Output Readable JavaScript
Works done 3,946

Related tools

JS Beautifier Details

JavaScript Beautifier breaks minified JavaScript onto separate lines and indents it so you can read it.

Use it to inspect a live script, follow the flow while debugging, or open a file before editing it by hand.

The workflow

Short version: give it input, run it, take the output. Details below.

  1. Paste the JavaScript into the box.
  2. Run the tool; the code is expanded with indentation.
  3. Copy or download the result.

Technical details

Formatting behaviour:

  • Lines break at brace and semicolon boundaries with two-space indentation.
  • Runs of blank lines collapse into one.
  • The work happens in your browser; the code is never uploaded.
  • Characters, lines and bytes are reported under the output panel.

When to choose this tool

This page is for readability; to reduce size use the JavaScript Minifier.

It is a text-level formatter, not a parser: it cannot restore names that a minifier shortened and does not read source maps. Braces and semicolons inside strings can cause unexpected breaks.

Small things that help

  • Also try your browser's built-in pretty print — with a source map it gives better results.
  • Do not ship the beautified file; ship the original source.
  • Check the output line by line when the code contains template literals.

Where your data is processed

This tool runs entirely in your browser, so what you type is not sent to the server. The only request that leaves is a counter with no content in it. Third-party advertising cookies may be present on the page, and they cannot read your input.

Frequently asked questions

Type or paste your data into the JavaScript field, run the tool, then copy or download the Readable JavaScript result.

Yes. While the text field is focused, Ctrl + Enter (Cmd + Enter on macOS) runs the tool.

You can copy the output or save it as a text file with the download button. The file name is based on the tool name.

The tool shows the error message in the output area. Fix the input and run it again.