Format or minify JavaScript
This tool does two things. Beautify turns compact or messy code back into something readable with neat indentation. Minify does the opposite: it removes spaces, comments and unnecessary characters so your file is as small as possible — handy for production.
How it works
- Paste your JavaScript into the input field (or click “Example”).
- Choose “Beautify” or “Minify”.
- Copy the result with one click.
Good to know
- If there's a syntax error while minifying, you'll get a message.
- Your input is kept when you reopen the page.