HTML Formatter
Beautify and indent HTML markup.
OpenExpand a compressed stylesheet into one declaration per line so you can read and edit it.
Paste a stylesheet or drop a .css file onto the input.
Rules, declarations and nested @media blocks are indented live.
Press Minify when you want the compact version back.
Copy the result or save it as formatted.css.
A third-party widget ships a single line of CSS and one of its rules is overriding your button styles. To find which selector is responsible, you need the file laid out properly. Paste it here and every rule, declaration and media query gets its own line.
The formatter walks the stylesheet character by character. An opening brace starts a new indented block, each semicolon ends a line, and closing braces step back out, so declarations inside @media and @supports rules end up two levels deep. Comments and quoted strings (font names, content values, url paths) are copied through untouched. Output refreshes as you type, you can drop a .css file onto the input, and Download saves formatted.css.
Formatting never reorders properties or removes duplicates, so if a property appears twice in a rule, the later one still wins. The readable layout simply makes those duplicates easy to spot. Once you know what is going on, compare selector weight with the specificity calculator, or minify the stylesheet again for production. For the HTML side of the same component, the markup formatter works the same way.
No stylesheet is sent anywhere for formatting. The parsing loop runs inside this tab, which is handy when the CSS comes from a client project under NDA.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
No. Declarations keep their original order and duplicates stay in place. That is deliberate, because order decides which value the browser applies.
Nested SCSS and Less blocks indent correctly, because the tool only looks at braces, semicolons, comments and strings. It does not recognize // line comments, which can merge with the following line, so treat preprocessor source as a best effort.
Comments, line breaks, spaces around braces, colons, semicolons and commas, and the last semicolon in each block. Values are not rewritten, so colors and units stay exactly as you wrote them.