JavaScript Formatter
Beautify minified JavaScript with clean indents.
Free
Runs in your browser
About this tool
JavaScript Formatter re-indents code and adds line breaks so minified scripts become readable. It also works for JSON and most TypeScript.
How to use JavaScript Formatter
- Paste your JavaScript.
- Choose indent size and brace style.
- Press “Beautify”, then copy or download.
Questions people ask
Can it restore original variable names?
No. If a minifier renamed variables to single letters, the names are gone. Formatting only restores layout.
Does it work with TypeScript or JSX?
Most TypeScript formats fine. JSX can be handled, but complex JSX may indent unevenly.
Is my code uploaded?
No. The formatter (js-beautify) runs in your browser.
More developer tools
See all 24 →
HTML MinifierShrink HTML by removing comments and whitespace.
CSS MinifierCompress CSS by stripping comments and spaces.
JavaScript MinifierRemove comments and whitespace from JavaScript.
Cron Expression ExplainerExplain cron schedules in plain English with next runs.
JSON to YAMLConvert JSON to clean YAML instantly.
YAML to JSONConvert YAML to formatted or minified JSON.