YOUR TEXT, IN FOCUS

JavaScript Beautify.

Format JavaScript locally with consistent indentation and syntax error locations. Copy or download the result.

Free · No account
Text stays in this tab
0 LinesUTF-8 · TXT / JS
Ctrl/⌘ + Enter: format

Formatting only: code is never executed. Input stays in this tab.
01 — How to use it

Make compact JavaScript easier to review.

  1. Paste JavaScript or import a UTF-8 .js / .txt file.
  2. Choose indentation and format the code.
  3. Review the result before copying or downloading it.
02 — A few useful details

Formatting does not execute code, fix logic, recover original variable names or deobfuscate programs. Syntax errors preserve the input. Embedded languages are not formatted.

Use UTF-8 plain text, up to 1 MB and 20,000 lines per input.

Input and output example

Example settings: Format · 2 spaces

Input
const greet=(name)=>{return "Hello, "+name};
Output
const greet = (name) => {
  return "Hello, " + name;
};

Common questions

Does formatting execute my code?

No. Parsing and formatting run in a browser worker. The input is not executed or sent to a formatting server. This is not a security or correctness audit.

Which files can I import?

Use UTF-8 plain text, up to 1 MB and 20,000 lines per input. UTF-8: .js, .txt