JavaScript minifier & beautifier
Paste your JavaScript, then shrink it by stripping comments and extra whitespace, or tidy it up with clean indentation. Strings, template literals and regex are left untouched. Everything runs in your browser.
This is a lightweight formatter, not a full compiler — it never renames variables, removes semicolons, or rewrites your code. It only strips comments and adjusts whitespace, so the output behaves exactly like the input.
Everything runs in your browser. No upload, no sign-up.
How it works
Paste your JavaScript
Drop in a script or snippet. It is parsed right in your browser — nothing leaves your device.
Minify or beautify
Minify strips comments and collapses whitespace safely. Beautify re-indents with 2 spaces. Strings, template literals and regex are preserved either way.
Copy or download
See how many bytes you saved, then copy the result or download it as a .js file. Nothing is uploaded.