Free Tool

HTML, CSS and JS Minifier with Code Obfuscator

Minify JavaScript, CSS and HTML in one click and, if you want, obfuscate the code to make copying harder. Everything is checked before you publish.

✅ JS, CSS and HTML minify ✅ Code obfuscator ✅ Automatic checks ✅ Code stays in your browser
🗜️ Minifier and Obfuscator

Minification

Obfuscation (optional)

Makes your JavaScript harder to read and copy. Leave it off if you only want to minify.

Advanced obfuscation options
Comma separated. Use it for functions called by other files.
Only hides text in scripts larger than this (in bytes).
Preparing the engine (slow only on the first visit)…

Result

Before publishing: always keep the original file. Upload the minified version as a copy, open it in the browser, test the buttons and check the console (F12) before replacing the live file.

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

  1. Drop your file on the dotted area, click it to browse your computer, or paste the code.
  2. The code type (HTML, CSS or JavaScript) is detected automatically. You can also pick it yourself.
  3. Choose the minification options and, if you want to protect the code, the obfuscation options.
  4. Click Minify and look at the check: green means text, links, headings and scripts were preserved.
  5. Copy the result or download the .min file, 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.

AspectMinifyObfuscate
GoalLoad fasterMake reading and copying harder
Function namesStay the sameBecome codes like _0x1a23
String textStays readableEncoded until run time
File sizeAlways smallerMay grow a little
Best forEvery live websiteTools, 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.

More developer tools

Frequently Asked Questions

The minifier is conservative: it keeps JavaScript line breaks and preserves strings, regex, calc() and <pre> content. After processing, the tool checks visible text, links, headings, JSON-LD and script syntax. Still, test the minified version before replacing the original file.
Minifying removes spaces and comments to make the file smaller. Obfuscating renames functions and variables and encodes text to make the code hard to read. Obfuscation is optional and can be combined with minification.
Indirectly, yes. Smaller files load faster, which improves the Core Web Vitals metrics Google uses. The page content, which is what Google reads, does not change.
No. Everything is processed in your browser. Once the page and the engine have loaded, you can even go offline and keep using it.
Yes. Drop a .css or .js file, or paste the code. The type is detected automatically and the downloaded file keeps its extension, like style.min.css or script.min.js.
For safety. JavaScript inserts semicolons automatically at the end of lines (ASI). Putting everything on one line could break code written without semicolons. Each line break is just 1 byte, and gzip almost cancels that difference.
It is 100% free, with no sign-up, no login and no usage limit.

We value your feedback!

Feel free to send us your opinion or suggestion.
Our team reads every message carefully.


Did something go wrong while using the tool?
Contact our support team →