CSS Formatter
Indent CSS selectors and declarations so a stylesheet is easier to read.
Runs on your device. Nothing you add is uploaded.
Formatted CSS
.garden {
display: grid;
gap: 1rem;
}
.garden h2 {
color: #355834;
}How to use CSS Formatter
- Paste the CSS source.
- Choose your indentation width.
- Copy the output.
Questions
What does the tool change?
Choose two or four spaces. Comments and quoted string contents are retained.
Where is my input processed?
On your device. The tool does not upload the input or its result.
How this works
Uses the browser build of Prettier with the matching language plugin.
Everything happens in this browser tab. What you type or add stays on your device, and the page has no tracking. Your last settings are kept in this browser so the tool opens the way you left it. Privacy
Related tools
More in DeveloperHTML Formatter
Indent HTML markup and lay out attributes and elements consistently.
CSS Minifier
Remove unnecessary spacing from CSS while keeping values and selectors intact.
SQL Formatter
Format SQL statements for the database dialect you use.
JSON Formatter
Indent JSON so objects and arrays are easy to read.