Kastavo

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

This website uses cookies

We use cookies to improve your experience and understand how the site is used. You can change this choice anytime in Cookie Preferences. See our Privacy Policy.