Developer Tools

CSS Formatter

Prettify or minify CSS with configurable indentation. Handles comments, media queries, nested selectors, and string values — free, browser-based.

No uploads — browser onlyInstant result
Indentspaces

CSS Input

How to format CSS

  1. Paste your CSS into the input area.
  2. Choose Prettify for readable formatting or Minify to strip whitespace for production.
  3. Set the indent size if prettifying.
  4. Click the button and copy the output.

Privacy — processed in your browser

All CSS formatting runs entirely in your browser using pure JavaScript string parsing. Your stylesheet is never sent to any server.

Frequently Asked Questions

Does minification affect CSS behaviour?

No — CSS minification only removes whitespace and comments. It does not reorder rules, change selectors, or alter property values. The resulting CSS produces identical rendering to the original.

Does the formatter handle @media queries?

Yes — @media, @keyframes, @supports, and other at-rules are handled correctly with proper nested indentation.

Will it handle vendor-prefixed properties?

Yes — vendor prefixes like -webkit-, -moz-, and -ms- are treated as normal declarations.

Related tools