HTML / CSS / JS Minifier
Strip comments and whitespace from your code and see exactly how many bytes you saved — safely, in your browser.
Why minify?
Every byte you ship travels to every visitor on every page load. Comments, indentation and blank lines are for humans — browsers don't need them. Minification removes them, typically cutting hand-written CSS by 20–40% before compression even starts. Smaller payloads mean faster first paint, better Core Web Vitals, and lower bandwidth bills.
What "safe mode" means here
This tool applies only transformations that can't change behavior: CSS loses comments and inter-rule whitespace; HTML loses comments and between-tag whitespace (while <pre>, <textarea>, <script> and <style> contents are preserved exactly); JavaScript loses comments, indentation and blank lines but is not collapsed onto one line — aggressive JS minification requires a real parser to handle automatic semicolon insertion, and doing it with regexes is how sites break. License banners starting with /*! are kept.
FAQ
Should I minify by hand before deploying?
For anything beyond a quick static page, no — make it part of the build. Bundlers (Vite, esbuild, webpack) minify with full parsers, plus tree-shaking and compression. If you deploy on Abasthan, the build pipeline runs your framework's production build automatically, so minification is handled without thinking about it.
Why is my JS only slightly smaller?
Safe mode keeps one statement per line. The big JS wins (variable renaming, dead-code elimination) need an AST-based minifier like terser — that's a build-step job, not a paste-into-a-textarea job.
Does minification replace gzip/brotli?
No, they stack: minify first, then your server compresses the response. Minified + brotli is typically 70–90% smaller than the original source.
Free tools are just the start
Deploy your next app on bare-metal cloud with per-second billing — your first app is free, no credit card required.
More free tools
Generate strong, random passwords with a cryptographically secure RNG — entirely in your browser.
Encode text to Base64 or decode it back — UTF-8 safe, with URL-safe variant support.
Percent-encode strings for safe use in URLs, or decode %20-style sequences back to text.
Decode a JSON Web Token's header and payload, check expiry, and verify HS256 signatures.
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of any text — instantly, in your browser.
Validate JSON with precise error locations, then pretty-print or minify it — with sorted keys if you like.