Online JavaScript 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.
- Run minification in the page.
- Copy the result.
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Online JavaScript Minifier is a free JavaScript Tools utility that runs entirely in your browser — nothing you enter is uploaded.
How to use Online JavaScript Minifier
- Drop your text into the field at the top of Online JavaScript Minifier.
- Online JavaScript Minifier updates the output automatically as you type.
- 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.
There is no server behind Online JavaScript Minifier. Online JavaScript 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. It behaves the same on desktop and mobile, with nothing stored remotely.
Frequently asked questions
How do I use Online JavaScript Minifier?
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Is Online JavaScript Minifier free to use?
The tool is free to use. Its local parser accepts up to 2 MiB of UTF-8 input per operation.
Where is my data processed by Online JavaScript Minifier?
Entirely in your browser — Online JavaScript Minifier keeps your data on your own machine and sends nothing anywhere.
Can I use Online JavaScript Minifier without a connection?
Yes — after the first load Online JavaScript Minifier runs entirely offline.