Minify JavaScript, CSS, HTML, and JSON — with live byte savings.
Minify JavaScript (Terser), CSS (CSSO), HTML, and JSON to shrink file size for production. Removes comments and whitespace and shortens JS names, showing how many bytes you saved. HTML minification preserves pre/script/style. Runs in your browser.
Upload your file using the tool above.
Adjust any settings to your preference.
Click the process button and wait for results.
Download your output using the download button.
JavaScript typically drops 30–60%, since variable renaming and dead-code removal add to the whitespace savings. CSS usually falls 20–40%. On top of that, your server should be sending gzip or brotli, which compounds the saving considerably — minified code also compresses better because it is more repetitive.
For anything ongoing, your build pipeline — Vite, webpack, esbuild and Next all minify production output automatically, so it stays consistent and you cannot forget. A tool like this is for one-off cases: a standalone script, an inline snippet, or checking what a specific file would compress to.
Rarely, but it happens. Code relying on function names at runtime, or on framework behaviour tied to parameter names such as older dependency injection, can break when identifiers are renamed. Always test the minified bundle rather than assuming the unminified version passing means both do.
Yes, Code Minifier is completely free. No signup, no account, and no watermark on outputs. A Pro tier is available for 100 AI ops/day and larger file sizes.
Code Minifier runs entirely in your browser. Your file is never uploaded — it is read, processed and saved locally, so it never reaches our servers or anyone else's. You can disconnect from the internet after the page loads and it still works.
What it does: Shrinks code for production by removing comments, whitespace, and (for JS) shortening names — reducing file size and speeding up page loads. JavaScript uses Terser and CSS uses CSSO, the industry-standard minifiers.
HTML minification is conservative: it strips comments and collapses whitespace but preserves the contents of <pre>, <script>, and <style> exactly, so it can’t corrupt inline code.
Privacy: Everything runs in your browser — your code is never uploaded, so it’s safe for proprietary source.