🗜️ 4 Free Minifiers

Minify Tools

Free online minifiers for CSS, HTML, JavaScript, and JSON — powered by csso, html-minifier-terser, and Terser. Batch mode, live size and savings stats, and everything runs in your browser.

4Minifiers
0Signup Needed
100%Browser-Based
Files

All Minifiers

4 tools

Why Minify?

Faster Pages
Smaller CSS, HTML, and JS mean less to download and parse — improving Core Web Vitals like LCP and TBT.
📦
Batch Mode
Minify many files at once in the CSS, HTML, and JS tools, with per-file and total savings.
🔒
Completely Private
Every minifier runs in your browser using real parsers. Your code is never uploaded.

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.

Frequently Asked Questions

What is minification?
Minification removes characters that a browser or parser does not need — comments, whitespace, and newlines — and can shorten names and values, producing a smaller file that behaves identically. It is a standard production build step for web assets.
Which files should I minify?
Minify the assets you ship to users: CSS stylesheets, HTML documents, and JavaScript bundles for faster page loads, and JSON payloads/config to reduce transfer size. Keep the readable, commented source in version control and generate minified output at build or deploy time.
Is minification the same as gzip compression?
No — they stack. Minification shrinks the text itself (removing whitespace, shortening names). Gzip or Brotli then compresses that text at the network layer. Minifying first and letting your server compress on top gives the smallest transfer size, often 70–85% below the original.
Is minifying safe — will it break my code?
Yes, these tools are safe. They use real parsers — csso for CSS, html-minifier-terser for HTML, and Terser for JavaScript — that understand structure rather than blindly editing text, so meaning is preserved. If input has a syntax error, the tool reports it instead of producing broken output.
Are these minifiers free and private?
Yes. Every minifier is free with no signup, and all processing happens entirely in your browser — your code is never uploaded to a server, so it is safe to use with proprietary or unreleased files.
Can I minify multiple files at once?
Yes. The CSS, HTML, and JavaScript minifiers each have a batch mode — add multiple files and the tool minifies each one locally and reports per-file and total savings.