Skip to content
Run here 100% in your browser, no upload, no login

CSS Formatter

Minify or beautify CSS with a string-aware parser that keeps quoted values and url() intact.

String-aware: quoted values and url() contents are never touched.

How to use it

  1. Paste your stylesheet into the left panel — a small sample loads so you can try both directions.
  2. Click Beautify to get indented rule blocks, one declaration per line and selector { layout.
  3. Click Minify to collapse whitespace and remove comments for a production-ready single line.
  4. Click Copy to take the result, or edit the input again and re-run either direction.
  5. The status line shows output size and how many characters minification saved.

Common use cases

Why it stays private

The parser is a local string walker: quotes and url() contents are detected character by character and never rewritten. Your stylesheet never leaves the browser, which matters for unreleased designs and client work.

FAQ

Q: What exactly does string-aware mean here? A: Content inside single or double quotes, and inside url(...), is copied verbatim. A semicolon or brace inside a string does not confuse the formatter, so data URIs and font names with spaces survive.

Q: Are comments preserved? A: No. Both directions remove /* ... */ comments, including license headers — re-add the license line manually if the stylesheet requires attribution.

Q: Does it reorder or rename anything? A: Never. Rules and declarations keep their order and spelling; the formatter only moves whitespace and line breaks, so the compiled result is semantically identical.

Your data stays on this device

CSS Formatter runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.