What is code minification?
Minification removes everything in your code that only exists to help people read it: spaces, indentation, extra line breaks and comments. Browsers ignore those characters, so the page works exactly the same, but the files get smaller and load faster. This HTML, CSS and JS minifier does it in one click and checks the result before you publish.
How to minify JS, CSS and HTML online
- Drop your file on the dotted area, click it to browse your computer, or paste the code.
- The code type (HTML, CSS or JavaScript) is detected automatically. You can also pick it yourself.
- Choose the minification options and, if you want to protect the code, the obfuscation options.
- Click Minify and look at the check: green means text, links, headings and scripts were preserved.
- Copy the result or download the
.minfile, ready to upload to your server.
JS minify (JavaScript minification)
When you minify JS, the tool removes // and /* */ comments and the whitespace JavaScript does not need, without touching strings, template literals or regular expressions. Line breaks are kept on purpose: JavaScript has automatic semicolon insertion (ASI), and squeezing everything onto one line could break code written without ;. License comments marked with /*! are kept too. You can paste a standalone .js file or a full page with inline scripts.
CSS minify
To minify CSS, the tool removes comments, the spaces around braces, colons and commas, and the last semicolon in each block. Everything CSS needs to work stays: the spaces inside calc(), media queries, quoted text and url() addresses.
HTML minifier
The HTML minifier collapses spaces and indentation, removes comments, drops the redundant type from <script> and <style> tags, and compacts structured data blocks (JSON-LD). Content inside <pre> and <textarea> is never changed, because spaces there show on screen. Conditional comments and those marked with <!--! are kept as well.
Minify or obfuscate: what is the difference?
Minifying makes the file smaller. Obfuscating makes the code hard to understand. This tool can do both at once.
| Aspect | Minify | Obfuscate |
|---|---|---|
| Goal | Load faster | Make reading and copying harder |
| Function names | Stay the same | Become codes like _0x1a23 |
| String text | Stays readable | Encoded until run time |
| File size | Always smaller | May grow a little |
| Best for | Every live website | Tools, games and your own scripts |
A code obfuscator is not encryption. Someone with time and skill can still study the code, but it takes much more work. That is why you should never put passwords or API keys in JavaScript, obfuscated or not: they belong on the server.
Does minification help SEO?
Yes. Google PageSpeed Insights recommends reducing JavaScript and CSS, because smaller files arrive sooner and improve Core Web Vitals such as LCP. Minification does not change the text, headings or links, which is what Google reads, and the tool checks exactly those points.
Also look at the gzip numbers. Most servers already compress files when sending them, so the gain your visitors feel is the "Gzip after" figure. It is common for raw savings to be 15% and gzip savings to be around 5%.
Your code never leaves your computer
The minification and obfuscation engine runs inside your browser, using Python compiled to WebAssembly. No code is uploaded, saved or stored on a server. On your first visit the engine is downloaded and cached, so later visits open much faster.