PdfVane

Code Minifier

Strip comments and extra whitespace from CSS, HTML, or JavaScript.

Your files stay on your device — nothing is uploaded

6337 bytes(−41%)

.card{padding:16px;border-radius:8px}

This strips comments and collapses whitespace safely — it doesn't rename variables or restructure code, so output stays readable and won't break on edge cases the way an aggressive minifier sometimes can.

Sometimes you just need to shrink a CSS, HTML, or JavaScript snippet without setting up a full build pipeline. This tool strips comments and collapses whitespace safely — no variable renaming, no restructuring — so the output stays predictable, entirely in your browser.

How to use the code minifier tool

  1. 1

    Pick a language

    Choose CSS, HTML, or JavaScript.

  2. 2

    Paste your code

    Add the code you want to shrink.

  3. 3

    Copy or download

    Grab the minified version, and see exactly how many bytes were saved.

Common use cases

Shrink a stylesheet before deploying

Strip comments and whitespace from CSS to reduce its file size.

Compress an inline script

Minify a small JavaScript snippet before embedding it in an HTML page.

Clean up exported HTML

Remove comments and excess whitespace from HTML pulled out of another tool.

Frequently asked questions

It's intentionally conservative — it strips comments and collapses whitespace, but doesn't rename variables, remove unused code, or restructure logic the way a full build-tool minifier (like Terser) does. That makes it safe to use on any snippet without a build step.