
Web developers use JavaScript Minifier when preparing compact code for delivery or a controlled comparison.
Compress and optimize JavaScript and get compact code ready for the next step. Use it for free in your browser, with no account required.
A typical situation: you are preparing a small script to embed in a page and want to cut the amount of data transferred. After minifying, check above all that the script still behaves exactly as before by running it in the browser console.
Compression happens in your browser on the script you provide. Nothing is sent to a third party and nothing stays behind once the tab is closed, which suits proprietary code you would rather not upload.
It should not change how the script behaves, since it works on the layout of the code. Even so, test the output on a copy before replacing the file you use in production, and keep a backup until you are satisfied with the result.
The picker accepts .js, .mjs, .cjs, .ts, .tsx, .html, .css, .json, .sql and .graphql files among others, plus plain text. One file is processed at a time.
A misread string or a misplaced semicolon can turn into compact code that no longer runs. Go back to the original, test the script in the browser console and fix the part that raises an error.