Input CSS
Paste your code to format it and check its syntax
Options
Adjust formatting and validate
Detect the format on paste. If ambiguous, choose it manually.
Result
Code viewer · Read only
Format and validate CSS online
Format CSS stylesheets, selectors, rules and media queries with custom indentation. Checks parser syntax, not browser compatibility or the validity of every property.
How to use the formatter
- Paste your code in the editor. JSON is the default format on the home page.
- Enable detection on paste or choose the format manually. HTML and XML can be ambiguous.
- Adjust indentation and select Format or Validate. The viewer includes syntax colors and folding for every format. Minification is available for JSON.
Code example CSS
.card{color:#2563eb;padding:16px;}
@media (max-width:600px){.card{padding:8px;}}
Is my code sent to a server?
No. Processing takes place in your browser. Pasted code is neither uploaded nor stored on the server.
What does validation check?
It checks syntax with the selected format’s parser. It does not execute code or guarantee that a program works correctly. If there is an error, fix the input and validate again.