Free Online Minifiers for CSS, HTML, JavaScript & JSON
Minification is one of the highest-return, lowest-risk optimisations for any website. By stripping comments, whitespace, and redundant characters — and, for JavaScript, shortening internal names — you cut the number of bytes users download and the work the browser does before your page becomes usable. These four minifiers cover the front-end stack plus JSON, and every one runs entirely in your browser with no signup and no upload.
CSS Minifier
The CSS Minifier uses csso, a structure-aware minifier that parses your stylesheet into a syntax tree. Beyond removing whitespace it can merge and restructure rules and shorten values — safely preserving calc(), custom properties, media queries, and vendor prefixes.
HTML Minifier
The HTML Minifier uses html-minifier-terser to remove comments and collapse whitespace, and it also minifies the CSS in <style> blocks and the JavaScript in <script> blocks in the same pass — ideal for server-rendered pages and email templates.
JavaScript Minifier
The JavaScript Minifier uses Terser, the AST-based engine behind modern bundlers, to compress code, drop dead code, and mangle local names — typically cutting JS size 30–60% while behaving identically to the source.
JSON Minifier
The JSON Minifier strips all non-essential whitespace from JSON to shrink API responses, configuration files, and bundled data — the smallest valid JSON, with your string values left untouched.
Minify vs Compression
Minification and gzip/Brotli compression are complementary, not competing. Minify first to shrink the text itself, then let your web server compress the minified file at the network layer. The combination routinely delivers a total transfer size 70–85% smaller than the original human-readable source.