CSS Formatter
Beautify and format CSS, SCSS and PostCSS code instantly
Ctrl + Enter to re-format instantly
Formatted CSS will appear here
Paste CSS above to begin
Advertisement
Free CSS Formatter powered by Prettier: beautify minified or messy CSS online with 2-space, 4-space or tab indentation. Runs entirely in your browser.
Beautify and format CSS, SCSS and PostCSS code instantly
Ctrl + Enter to re-format instantly
Formatted CSS will appear here
Paste CSS above to begin
A free online CSS formatter powered by Prettier. Paste minified or messy CSS and get clean, readable output. It formats standard CSS including custom properties, media queries, keyframes, and nesting. Sass-specific constructs such as @mixin and @include are not supported. Print width is fixed at 80 characters, and processing runs entirely client-side.
What you get with CSS Formatter.
Formats standard CSS, custom properties, media queries, keyframes, and nesting.
Formats CSS locally with a fixed 80-character print width.
Choose 2 spaces, 4 spaces, or tabs.
Live formatting in the browser — nothing sent to any server.
Follow these steps to get the best results.
Paste minified or messy CSS into the input — formatting runs automatically.
Pick 2 spaces, 4 spaces, or tabs to match your project.
Copy the formatted CSS or download it as a file.
Advertisement
Common questions about CSS Formatter.
No — only whitespace and formatting change. Selectors, property names, property order, and values are preserved.
No. This formatter uses Prettier's standard CSS parser. Compile Sass or SCSS to plain CSS first, then format the generated CSS.
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.
No. The CSS Formatter handles standard CSS, including custom properties, media queries, keyframes and nesting. Sass-specific syntax such as @mixin and @include is not supported.
Advertisement
Comments
Share feedback, ask questions, or help others use this tool.
Join the discussion
Sign in to comment, reply, and report inappropriate content.