CSS Beautifier

CSS Beautifier reformats minified, generated or inconsistently formatted stylesheets into clean, indented rules that are easy to scan and edit. Choose 2- or 4-space indentation to match your project.

It is the tool to reach for when you need to read a one-line production stylesheet or tidy up CSS before committing it. Formatting runs entirely in your browser.

How to use CSS Beautifier

  1. 1

    Paste your CSS

    Drop in minified or untidy styles.

  2. 2

    Pick an indent size

    Switch between 2 and 4 spaces of indentation.

  3. 3

    Copy the formatted CSS

    Grab the clean, indented output with the copy button.

Readable stylesheets

Minified CSS packs every rule onto as few lines as possible, which is efficient to serve but hard to read. Beautifying puts each declaration on its own line and indents the rules, so the structure of your stylesheet becomes obvious at a glance.

The beautifier changes only whitespace, so your selectors, properties and values are untouched. You can format, edit and then re-minify without any risk to the styling.

Beautify then minify

A common workflow is to beautify a vendor or build-output stylesheet to understand and edit it, then run the result back through a minifier before shipping. The CSS Beautifier and CSS Minifier are exact opposites.

Indentation is purely cosmetic, so the choice between 2 and 4 spaces is about matching your team's conventions.

Frequently asked questions

Does beautifying change my styles?
No. It only adds indentation and line breaks. The selectors, properties and values are unchanged.
Can it fix invalid CSS?
It reformats what you give it, but it is a formatter, not a validator, so it does not repair broken rules.
Is my CSS sent to a server?
No. Formatting runs entirely in your browser.

Last updated: