Minify JavaScript
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.
Minify JavaScript is a free JavaScript Tools utility that runs entirely in your browser — nothing you enter is uploaded.
How to use Minify JavaScript
- Enter or paste your text into the input field to begin.
- Minify JavaScript updates the output automatically as you type.
- 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.
Minify JavaScript is a static, client-side tool with no backend. Minify JavaScript handles your input locally and returns the result instantly, with no sign-up.
Because it runs on your device, it is fast and private and works offline once loaded. No data is sent anywhere, so it stays fast and private by default.
Frequently asked questions
What does Minify JavaScript 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 Minify JavaScript free to use?
The tool is free to use. Its local parser accepts up to 2 MiB of UTF-8 input per operation.
Is my input private in Minify JavaScript?
Yes — your input never leaves your device; Minify JavaScript does all the work in your browser.
Does Minify JavaScript work on mobile?
Yes — Minify JavaScript is just a web page and runs on any modern browser, including phones and tablets.