JS Minifier
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
- Paste JavaScript.
- Strip spacing and comments.
- Copy the one-line result.
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
JS Minifier is a free JavaScript Tools utility that runs entirely in your browser — nothing you enter is uploaded.
How to use JS Minifier
- Type or paste your text into JS Minifier's input area.
- The result is computed live in your browser as you edit the input.
- Finish by choosing Copy to take the output with you.
About this tool
Parses JavaScript scripts or modules with bundled Babel 7.26.4 and generates compact code without transpilation, name mangling or execution. Strings, regular expressions, template text and statement boundaries are handled by the parser. Ordinary comments are removed; /*! notices and @license/@preserve comments remain. TypeScript, JSX and unsupported syntax are errors. Input is limited to 2 MiB of UTF-8 text. Byte totals use UTF-8; compaction is not guaranteed to make every input smaller. Source maps and exact source-text introspection are not preserved.
There is no server behind JS Minifier. JS Minifier is a free JavaScript Tools utility that runs in your browser, doing its work on the input you provide without a backend.
It is designed to do one job well and stay out of your way. No data is sent anywhere, so it stays fast and private by default.
Frequently asked questions
What does JS Minifier do?
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Do I need an account for JS Minifier?
No — JS Minifier needs no account, sign-up or installation.
Is my input private in JS Minifier?
Yes — your input never leaves your device; JS Minifier does all the work in your browser.
Does JS Minifier work offline?
Once the page has loaded, JS Minifier keeps working with no network connection.