CSS Minifier and Beautifier

Make stylesheets smaller or readable. It happens on your device.

Your files stay with you. Your files never leave your browser. This tool runs on your device: nothing is uploaded to our servers, so there is nothing for us to store or see.

How to use it

  1. Paste your CSS or open a .css file.
  2. Choose Minify or Beautify.
  3. Copy or download the result.

Where it helps

Faster sites

Shrink a stylesheet before uploading it to your site or theme.

Reading CSS

Re-indent minified CSS from a theme or plugin to understand it.

Website builders

Paste compact custom CSS into a builder's code box.

Good to know

  • Stays in your browser

    Your text is processed on your device and never sent to our servers.

  • Test after minifying

    Open the page once and check it still looks and works right.

  • Plain CSS

    SCSS and Less syntax isn't guaranteed to survive.

Questions people ask

How do you minify CSS, or beautify it with clean indentation?

Paste your CSS or open a .css file and choose Minify or Beautify. Minify removes comments (keeping /*! licence */ ones), line breaks, extra spaces and the last semicolon in each rule, and shortens 0.5 to .5. Selectors, values and rule order never change, and spaces inside calc() are kept.

  • 20-40% Typical saving. Hand-written CSS.
  • /*! Licence kept. Comments with !.
  • calc() Safe. Spaces kept.
  • Order Unchanged. Selectors and rules.
What does it change when minifying?
It removes comments, except /*! licence */ ones, along with line breaks, extra spaces and the last semicolon in each rule, and it shortens 0.5 to .5. Selectors, values and the order of rules aren't changed, so the stylesheet behaves exactly as before, just in fewer bytes.
Is calc() safe?
Yes. Spaces around + and - inside calc() are required by CSS, so they're kept. Strings and url(...) values are never edited either. Those are the places where careless minifiers usually break stylesheets, and this tool is written to leave them alone. Custom properties such as --brand are kept as written too.
How much smaller will my file get?
Commonly 20 to 40 percent for hand-written CSS, and the tool shows the saving. Gzip or Brotli on your server shrinks the transfer further. Removing unused rules usually saves even more, but that needs a tool that knows which selectors your pages actually use. Every byte saved helps on mobile.
Does it support SCSS or Less?
It's built for plain CSS. Nested rules written in modern CSS are fine, but SCSS and Less features such as mixins, variables with $ or @ and functions aren't guaranteed to survive. Compile SCSS or Less to CSS first, then minify the compiled output. Your build tool can do this.
Is my CSS uploaded?
No. The stylesheet is processed in your browser and never sent to our servers. Nothing is stored when you close the page. That's useful for client themes and unreleased designs. You can even disconnect from the internet after the page loads and it still works.
Why keep /*! comments?
Comments starting with /*! are a common convention for licence notices that must stay with the code, for example in open-source frameworks. Keeping them means you stay within the licence while still shrinking the rest of the stylesheet. Ordinary comments, which only help people editing the file, are removed as usual.
Can I beautify minified CSS from a website?
Yes. Paste the minified CSS, choose Beautify and pick the indentation. Each rule and declaration goes on its own line, which makes it much easier to find the selector that styles a button or heading. It's a common first step when customising a theme. Override styles in your own file.
Will minifying break my media queries?
No. Media queries, keyframes, @font-face and other at-rules keep their structure. Only unnecessary whitespace and comments are removed. As with any change, load the page once at a few screen widths to confirm everything still looks right. Phone, tablet and desktop widths cover most cases, and rotating a phone checks a fourth.
Should I minify CSS in WordPress or a site builder?
Many caching plugins and builders can minify CSS for you. Use this tool when you paste custom CSS into a theme's custom CSS box or a builder's code field, where a compact version keeps things tidy. Keep a readable copy somewhere for future edits. Comments help future edits.
Does minifying CSS improve page speed?
Yes, a little. Smaller stylesheets download and parse faster, which helps on slow mobile connections common in many parts of India. Bigger wins usually come from removing unused CSS and images, but minifying is a quick, safe step worth doing. Stylesheets block the page until they load, which is why size matters.
Does it change colours or units?
It shortens decimals like 0.5 to .5 but otherwise leaves values as you wrote them, including colour formats. If you want colours converted between HEX, RGB and HSL, use the colour converter tool, which also checks contrast for readable text. Units such as px, rem and % stay exactly as written.
What indentation does Beautify use?
You choose from the options in the tool. Each declaration goes on its own indented line inside its rule, with a tidy, consistent layout. Match the indentation your project already uses so the beautified CSS fits in cleanly with your other files. Two spaces, four spaces or tabs.
Can I open a .css file?
Yes. Use the file button to load a stylesheet from your computer. The file is read in your browser, not uploaded. Download the result as styles.css or copy it to the clipboard, ready to paste into your editor, theme settings or a builder's code box.
Does it work on a phone?
Yes. Paste CSS or open a file on your phone, and copy or download the result. Editing long stylesheets is easier on a larger screen, but the minifier runs fully in your mobile browser with no app and no upload, so it's fine for a quick fix.
Is the CSS minifier free?
Yes. It's free with no sign-up and no limit on use. It's one of the free developer tools from Marketiism, along with the HTML and JavaScript minifiers and the CSS generators. Marketiism builds software for small Indian businesses. Use it as often as you need, for any project.

Want this inside your own account?

Marketiism keeps your invoice numbers, GST reports, UPI payment links and WhatsApp reminders in one place. Leave your details and we'll call to set it up for your business, or start the trial yourself.

Start free trial

We use this only to contact you about Marketiism. No spam.

More Developer tools

JSON Formatter

Format, validate and minify JSON, and see exactly which line has a mistake.

JSON to CSV

Turn a JSON list of records into CSV for Excel or Google Sheets.

CSV to JSON

Convert CSV rows into a JSON list, with numbers and true/false detected.

Try it on your own business for two weeks.

14 days free, no card. If you get stuck setting up WhatsApp, we'll get on a call and do it with you.