JavaScript Minification
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
- Paste readable JavaScript.
- Collapse it to its smallest form.
- Copy the compact code.
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
JavaScript Minification is a free JavaScript Tools utility that runs entirely in your browser — nothing you enter is uploaded.
How to use JavaScript Minification
- Paste the text you need to minify into the input box.
- Watch the output update instantly while you adjust the text.
- Use Copy to keep or reuse the result.
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.
JavaScript Minification runs entirely in your browser. JavaScript Minification is a free JavaScript Tools utility that runs in your browser, doing its work on the input you provide without a backend.
Because it runs on your device, it is fast and private and works offline once loaded. It behaves the same on desktop and mobile, with nothing stored remotely.
Frequently asked questions
What does JavaScript Minification do?
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Is JavaScript Minification free to use?
The tool is free to use. Its local parser accepts up to 2 MiB of UTF-8 input per operation.
Does JavaScript Minification upload my data?
No — JavaScript Minification processes everything locally in your browser, so nothing you enter is uploaded or stored.
Does JavaScript Minification work on mobile?
Yes — JavaScript Minification is just a web page and runs on any modern browser, including phones and tablets.