HTML, CSS & JavaScript Minifier
Pick a tab (HTML, CSS, or JavaScript), paste your code, and see the minified result, with size before and after.
Processed locally in your browser.
Your files never leave your device. This tool downloads a component the first time you use it and, in our Chromium test, worked without internet only after that, while the browser keeps it. Not measured in Safari or Firefox.
How it works
Minifying code strips out everything that only exists for human readability (spaces, comments, line breaks) without changing how the code behaves — shrinking the file so it loads faster. HTML and CSS are minified with our own conservative approach: comments are removed and whitespace is safely collapsed, without trying to rewrite the code's structure. Content inside <pre>, <textarea>, <script>, and <style> tags is never touched by the HTML tab — use the CSS and JavaScript tabs separately to minify that content. JavaScript is different: safely minifying JS requires truly understanding the language (variable scope, automatic semicolon insertion, closures) — a subtle mistake can silently break the code. That's why the JavaScript tab uses Terser, the same library webpack uses to minify millions of production projects, loaded on demand only when you use that tab.
Frequently asked questions
Related tools
Regex Tester
Test regular expressions live, with ready-made templates.
Development
Base64 Converter
Convert text to Base64 and Base64 back to text, with full Unicode support.
Development
Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes of any text, using the native Web Crypto API.
Development