JavaScript Formatter
The JavaScript formatter tokenises code and re-emits it with consistent indentation and line breaks. Because it only changes the whitespace between tokens, string literals, template literals, regular expressions and comments come through byte for byte.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the JavaScript Formatter
- Paste minified or badly formatted JavaScript.
- Choose an indent width.
- Copy or download the readable version.
Example
function a(){return 1}
function a() {
return 1
}
Common use cases
- Reading a minified bundle to work out what a third-party script does.
- Tidying a snippet pasted from a tutorial or a chat message.
- Making a compressed inline script readable while debugging.
Limitations and things to watch for
- This is a token-based formatter, not a full parser like Prettier. It reliably restores indentation and statement breaks, but it does not rewrap long expressions, normalise quote style or make opinionated line-breaking decisions.
- Minified code has already lost its original variable names; formatting restores structure, not meaning.
- Automatic semicolon insertion is respected — no semicolons are added or removed, so behaviour cannot change.