CSS Formatter

Pretty-print stylesheets so selectors and declarations are easy to scan. Formatting uses js-beautify in CSS mode and stays on your device.

Result

Paste code, then Format. Processing stays in your browser.

How to format CSS

  1. Paste CSS (stylesheet text, not a full HTML document).
  2. Pick an indent size.
  3. Click Format.
  4. Copy the readable CSS, or use CSS Minifier for a smaller file.

FAQ

No. It reformats text. Invalid or incomplete rules may still print with odd wrapping. Fix syntax in your editor if the output looks wrong.
Paste the CSS text itself. For a full HTML document, use the HTML Formatter instead.
No. Formatting runs entirely in your browser.
Yes. js-beautify preserves rule blocks and indents nested selectors and @media queries. Extremely custom preprocessors output may still need manual cleanup.
Yes. Paste one-line CSS from a bundle or CDN link snapshot. Format expands declarations so you can inspect overrides and specificity issues.

Related tools