CSS formatter
Beautify CSS rules and media queries, or minify CSS with strings and comments handled safely.
Missing a feature or found a bug in CSS formatter? Tell me on X (@_andrewtran) or by email.
How to use CSS formatter
- Paste your CSS in the input pane.
- Choose 2 spaces, 4 spaces or Minify.
- Copy the result or download it as a file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
What does minifying remove?
Comments, line breaks, spare spaces and the last semicolon in each block. Text inside quotes is never touched.
Are licence comments kept?
Yes. A comment whose first character after the opening is an exclamation mark is kept. That is the usual way to mark a licence notice.
Related tools
JSON viewer
Explore JSON as a collapsible tree, with counts for every object and list.Mock data generator
Generate made-up users, orders and products as JSON, CSV or SQL, from a schema you can edit.Gitignore generator
Build a .gitignore by combining templates for your languages, frameworks, editors and system.Key pair generator
Generate Ed25519, RSA and ECDSA key pairs as PEM, JWK and an OpenSSH public key.