Minify JavaScript, CSS, and HTML instantly in your browser. Strip whitespace and comments, shrink your files, and see exactly how much you saved — no sign-up, nothing uploaded.
A code minifier removes everything a browser does not need to execute your code — spaces, indentation, line breaks, and comments — to make the file as small as possible. For JavaScript, modern minifiers go further by renaming local variables and eliminating unreachable code, while keeping the program's behavior identical.
Smaller files download faster and use less bandwidth, which is why minification is a standard step before shipping web assets to production. This tool brings Terser, CSSO, and a safe HTML minifier together so you can compress any of the three without a build step.
Powered by Terser — drops whitespace, shortens local names, and removes dead code to produce a compact, runnable bundle.
Uses CSSO for structural optimization: merges rules, collapses values, and strips comments without changing how the page renders.
Collapses whitespace and removes comments while preserving the exact contents of pre, textarea, script, and style blocks.
See the original size, the minified size, and the percentage saved so you know exactly how much smaller the output is.
If your JavaScript has a syntax error, the tool surfaces the message inline instead of producing broken output.
Every byte is minified in your browser. Nothing is uploaded to a server or stored anywhere.
Pick JavaScript, CSS, or HTML. The input area is pre-filled with a readable sample you can replace.
Drop in the code you want to shrink. Switching language re-runs minification automatically.
JavaScript minification runs asynchronously with Terser; CSS and HTML run instantly.
Grab the minified result with one click, or download it as a .min.js, .min.css, or .min.html file.
Minification removes characters that are not needed to run the code — whitespace, line breaks, and comments — and, for JavaScript, can also shorten local variable names and remove dead code. The result behaves the same but is smaller and faster to download.
JavaScript is minified with Terser, CSS with CSSO, and HTML with a built-in safe minifier. Terser and CSSO are industry-standard libraries that run entirely in your browser.
Yes. The HTML minifier removes regular comments and collapses whitespace between tags, but it preserves the exact contents of pre, textarea, script, and style blocks and keeps IE conditional comments intact, so significant content is never corrupted.
Terser parses your code before minifying it, so a syntax error will stop the process. The tool shows the parser's error message inline so you can find and fix the problem.
No. All minification happens locally in your browser using client-side libraries. Your code is never sent to a server or stored.
It depends on the source, but the tool shows the exact savings for your input — original size, minified size, and the percentage reduction. Verbose, well-commented code typically shrinks the most.