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.

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 tools like webpack and Vite use to minify millions of production projects, loaded on demand only when you use that tab.

Frequently asked questions

Related tools