JavaScript formatter
Make JavaScript readable and consistent, with your preferred style.

How to use the JavaScript formatter
- Paste JavaScript or TypeScript, or choose a file.
- Pick indent size, quotes and semicolons.
- Press Format and copy or download.
When it's useful
- Reading minified or one-line scripts
- Making code style consistent before review
- Spotting syntax errors
Limits to know
- Formatting only — it doesn't minify, run or check the logic of your code.
Your privacy
Everything is worked out in your browser. What you type isn't uploaded, saved or shared, and there's no sign-up.
What goes in and what comes out
- Input:
- JavaScript or TypeScript pasted or as a file, up to 5 MB.
- Output:
- Formatted code, copyable or as a download.
Questions
Does it run my code?
No. It only reads and re-prints it.