Code Minifier
Minify HTML, CSS and JavaScript by removing comments and whitespace. See how much you reduce. 100% in your browser.
Built by
Miguel Ángel Colorado Marin (MACM)
Built by
Miguel Ángel Colorado Marin (MACM)
Full-Stack Developer · Guadalajara, España
I develop web apps, digital tools and full projects — from design to deployment.
How to minify code?
- 1
Choose the language
Select CSS, HTML or JS depending on the code you want to minify.
- 2
Paste your code
Paste the code into the left box. Everything is processed in your browser, nothing is uploaded.
- 3
Minify
Click Minify: comments and extra whitespace are removed and you'll see the reduction percentage.
- 4
Copy
Copy the minified code to clipboard, ready for production.
Frequently asked questions
Is my code uploaded to a server?
No. Minification happens 100% in your browser. Your code never leaves your device.
Is JS minification safe?
JS minification is basic: it strips comments and whitespace. For critical production use a bundler like esbuild or terser, which also renames variables.
How much is size reduced?
It depends on the code, but in CSS and HTML with many comments and spaces it's common to save between 20% and 50%.
Does it keep conditional comments?
In HTML, Internet Explorer conditional comments (<!--[if ...]-->) are kept; the rest is removed.
Related tools
Embed Code Minifier on your site
Add Code Minifier to any web page with a simple iframe. Free, with attribution to miguelacm.es.
<iframe
src="https://miguelacm.es/embed/code-minifier"
width="100%"
height="700"
frameborder="0"
title="Code Minifier — miguelacm.es"
></iframe>View embed in new tab →