OxyPages

Free Online CSS Minifier

Remove comments and whitespace from CSS and see exactly how many bytes you saved.

Free. No account. Live in seconds.

1.9 KB minified to 0 B

100% smaller (1.9 KB saved)

Input
Minified
Your CSS on a sample page. Free. No account. Live in seconds.

How It Works

How To Use The CSS Minifier

  1. 1

    Paste Or Open Your CSS

    Drop the stylesheet into the left pane or open a .css file from your computer. The minified version appears on the right as you type.

  2. 2

    Check The Savings

    The strip above the panes shows original size, minified size and the percentage saved. Open Options to switch the extra passes: last semicolons, short hex colours, zero units, and whether /*! comments are kept.

  3. 3

    Copy, Download Or Publish

    Copy the minified CSS, download it as style.min.css, or publish it on a demo page to check that nothing changed. No account is needed for the 30-minute link.

About This Tool

Minify CSS Without Breaking It

A conservative CSS minifier that runs entirely in your browser and shows you exactly what it saved.

This CSS minifier takes a stylesheet and removes the parts a browser never needs: indentation, line breaks, the spaces around colons and braces, and ordinary comments. Then, if you leave the extras on, it drops the last semicolon in each rule, shortens #ffffff to #fff, and turns 0px into 0 and 0.5em into .5em. What comes out is the same stylesheet with fewer bytes, ready to copy, download or publish. The savings strip tells you the original size, the minified size and the percentage saved, so you can decide whether the smaller file is worth having.

Who It Is For

Most people arriving here are holding a finished stylesheet from somewhere else: the CSS ChatGPT or Claude wrote for a landing page, an export from a design tool, a theme from a course, a file a freelancer handed over. Those files are usually well indented and full of explanatory comments, which is great for editing and pointless for serving. If you want to compress CSS before you put it online, or you simply want to see how much of your file is whitespace, paste it in.

How It Works

The minifier is a small scanner written for these tools, not a heavyweight build step. It walks your CSS once and treats three things as untouchable: quoted strings, the contents of url(), and comments that start with /*!, the convention for licence notices. Everywhere else, whitespace is tightened and ordinary comments disappear. Spaces around the operators inside calc() are kept, because CSS requires them. The colour and zero-unit passes only run inside declaration values, never in selectors or @media conditions, and zero units are left alone inside calc(), clamp() and flex, where 0px and 0 are not interchangeable. Percentages, times and angles keep their units too. Everything runs in your browser; nothing is uploaded until you choose to publish.

Limits

This is a CSS compressor that prefers safe over small. It does not merge duplicate selectors, reorder or drop declarations, convert rgb() to hex, or rewrite shorthand properties. If you need the last few percent, a build-step minifier will do more. If you need the opposite, the CSS Formatter turns minified CSS back into something readable, and the HTML Minifier does the same job for the page around it, including any <style> block.

Then Put It Online

A stylesheet is not a page on its own, so the Publish button wraps the minified CSS in a small demo page with a heading, a paragraph, a button and a few cards, and puts it on a free OxyPages link with HTTPS in seconds, no account needed. The link lasts 30 minutes unless you claim it, and claiming is free; from there you can choose your own address and, on a paid plan, connect a custom domain. To ship a real page, paste the CSS into a <style> block or upload the .css file alongside your HTML in a ZIP. See how it works for the full picture.

Questions

Frequently Asked Questions

Not if the CSS was valid to begin with. Strings, url() contents and calc() spacing are preserved, and the colour and zero-unit rewrites only touch values where the shorter form means exactly the same thing. The one case a minifier cannot save is CSS that was already broken, such as an unclosed string or brace; the output then mirrors the input. Check the result on the demo page before relying on it.

Try It Now

Still Here? Drop It In.

The whole pitch fits in one sentence: your HTML, on a link, in seconds.

Drag and drop your HTML file(s), folders, or ZIP file

or ·

No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.

  • No Account Needed
  • Free SSL
  • 30-Minute Unclaimed Link, Claim To Keep It