Advertisement
CSS Formatter – Beautify & Format CSS Code Online Free
NewFormat and beautify CSS, SCSS, and PostCSS code instantly with Prettier. Control indentation and print width. Fully browser-based — no uploads needed.
CSS Formatter
Beautify and format CSS, SCSS and PostCSS code instantly
Ctrl + Enter to re-format
Formatted CSS will appear here
Paste CSS above to begin
What is CSS Formatter?
A free online CSS formatter powered by Prettier. Paste minified or messy CSS, SCSS, or PostCSS and get clean, readable output. Supports modern CSS including custom properties, media queries, keyframes, and nesting. Customise indentation and print width. Runs entirely client-side — nothing is uploaded.
CSS Formatter Features
CSS, SCSS & PostCSS
Handles plain CSS, SCSS variables/mixins, and PostCSS syntax.
Modern CSS Support
Custom properties, container queries, @layer, and nesting are all supported.
Print Width Control
Set line wrapping at 80, 120, or unlimited characters.
Instant & Private
Live formatting in the browser — nothing sent to any server.
Advertisement
CSS Formatter FAQ
No — only whitespace and property order within blocks may change. Selectors, property names, and values are preserved exactly.
Yes — the formatter handles SCSS including variables ($var), mixins, nesting, and @include directives.
Yes — paste any minified CSS string and the formatter will expand it into readable, properly structured code.
Yes — CSS custom properties (--color-primary: #fff) and all modern CSS features including @layer, @container, and nesting are supported.