Tidy a stylesheet or minify it, with the size saved shown
Runs in your browser. Nothing you type is sent anywhere. Updated on 25 Oct 2026.Formatting CSS indents it so a stylesheet can be read, and minifying strips every space and comment for production. The bytes saved are shown, so the gain on a 2 KB file is visible before you decide. Everything runs in your browser and nothing is uploaded.
Paste the stylesheet into the CSS box, or press Try an example.
Keep Beautify for one declaration per line, or pick Minify for the smallest file.
With Beautify, choose 2 spaces, 4 spaces or Tab under Indent.
Press Copy or Download to take the result.
This CSS formatter has two modes. Beautify lays a stylesheet out with one declaration per line, even indentation and consistent spacing around colons and braces. Minify strips comments and whitespace, shortens colours and units, and can merge rules that share the same block, then shows the size before, the size after and the percentage saved.
People reach for it at both ends of a job. At the start, a stylesheet arrives minified from a CDN or a build output and you need to read the rule that is causing a layout problem. At the end, you have a hand-written file and want the smallest version to ship. Both are one paste and one click here.
Minifying uses csso. The restructure option is the aggressive part: it merges rules with identical blocks, removes declarations that a later rule overrides and reorders where that is safe. It usually saves a few more percent and the result is equivalent, but if you are auditing a diff or your CSS depends on source order in ways a tool cannot see, turn it off and only whitespace and comments go. Comments beginning with an exclamation mark, which is where licence headers live, can be kept.
Above the result you get the number of rules, selectors, declarations and at-rules. If a brace, comment or quote is left open, you get the line and column where it started and what to add, rather than a parser dump. Everything runs in your browser, so a stylesheet from an unreleased project is never uploaded anywhere.
Yes. No signup, no file size limit and no cap on how many stylesheets you run through it. The page is supported by a few ads shown outside the tool, and your result is never touched by them.
No. Beautifying and minifying both run in your browser with JavaScript. A stylesheet from an unreleased design or an internal admin tool never leaves your device, and nothing is kept once you close the tab.
A hand-written stylesheet with comments and indentation usually drops 15 to 30 percent, and restructure adds a couple of points more on top by merging duplicate rules. The page shows the exact byte count before and after, so you never have to guess.
Restructure merges rules that have identical blocks, removes declarations that a later rule overrides, and reorders selectors where that is safe. The extra saving is usually a few per cent on top of plain minification. Turn it off when you want only whitespace and comments removed, for example when you need a readable diff between two builds.
Yes. Choose Beautify and paste the minified file. It comes back with one selector per line, one declaration per line and media queries indented inside their block. Selector names, values and order stay exactly as they were.
Minifying should not break a valid stylesheet. csso parses the CSS properly rather than using text replacement, so strings, data URIs and custom properties survive. If the file cannot be parsed you get the line and column instead of a broken result, and nothing is copied.
Still stuck? Ask about CSS Beautifier & Minifier and anybody who knows can answer. No account needed.
Same job, other tools: JSON Minifier – Strip whitespace from JSON for production · HTML Minifier – Strip comments and spare whitespace from HTML and see the saving · JS Minifier – Shrink a JavaScript file with terser and see the size saved · JavaScript Beautifier – Reformat JavaScript with Prettier, in the indent style you use.
On the related tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL.
Also works as: CSS Beautifier.
In the collection Code Formatters and Minifiers.