Code Minifier

Minify HTML, CSS, and JavaScript online to shrink file size and speed up your site. Free code minifier that runs in your browser.

0 B
Original
0 B
Minified
0%
Saved
Ready.

How to use the Code Minifier

  1. Pick what you’re minifying: CSS, JavaScript, or HTML.
  2. Paste your code on the left (or click Load sample).
  3. Click Minify — comments and needless whitespace are stripped instantly.
  4. Check how many bytes you saved, then Copy or Download the result.

Frequently asked questions

How much smaller will my files get?
It depends on the code, but stripping comments, whitespace, and shortening JavaScript often cuts 30–70% of the raw size. The savings box shows your exact result.
Is minification safe for my code?
Yes. CSS uses CSSO and JavaScript uses Terser — both battle-tested minifiers. The HTML minifier deliberately preserves the contents of <pre>, <textarea>, <script>, and <style> so nothing inside them breaks.
Does JavaScript minification also obfuscate?
Terser mangles local variable names and removes dead code, which makes output harder to read, but it is optimization — not secure obfuscation. Never rely on it to hide secrets.
Is my code sent anywhere?
No. All minification runs locally in your browser using JavaScript. Your source code is never uploaded or stored.