What this tool does
Minified or badly spaced JavaScript becomes readable JavaScript.
const a=[1,2,3].map(x=>x*2);if(a){b()}
const a = [1, 2, 3].map(x => x * 2);
if (a) {
b()
}
Spaces around operators, one statement per line, one indentation level per block — two spaces by default, four if you prefer. The code that comes out runs exactly like the code that went in.
What minification took away, formatting cannot give back
function t(e){return e*2}
function t(e) {
return e * 2
}
The structure is back; the names are not. Minifiers rename to save bytes, and the original multiplyByTwo is not hidden somewhere in the file — it is gone. Formatting is the only half that is reversible. If the site shipped a source map, that is what carries the names, and a browser’s dev tools will use it.
What it copies verbatim
- Strings and template literals.
"a b"keeps its two spaces: inside quotes, whitespace is a value, not layout. - Regular expressions.
/a b/is left alone — a space in a pattern matches a space. - Comments. Line and block comments keep their place, including a licence banner at the top of the file.
It is not a validator, and not a linter
Broken code comes back indented rather than reported, which is often what you want when you are hunting for the place it broke — but a tidy result is not a verdict. For whether it parses, run it or open it in your editor; for style and mistakes, use ESLint or the equivalent for your project.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.