Make a stylesheet easier to work with
Paste CSS or import a UTF-8 CSS file, choose indentation, and select Format CSS. Copy or download the result. Advanced options control preferred line width and quotes; wrapping editor lines only changes the display. Try the example for a responsive card with a fallback declaration, a media query and custom properties.
Keep meaningful source details
Rules and declarations stay in their original order, including repeated properties used as fallbacks. Custom property declarations keep their source text after line endings are normalized, with a final semicolon added if missing. This avoids collapsing spaces or changing quotes in values that may also be read by JavaScript. Comments are retained, but their surrounding layout can change.
Other values may be normalized, such as hexadecimal letter case or leading decimal zeros. Test the result in your project. This tool formats plain CSS; it does not compile Sass or Less, validate property values or browser compatibility, add prefixes, or minify CSS.
Recover your work
The input stays editable alongside the result. Import, example, clear, large paste and Use output as input provide one Undo replacement for the input, formatting options, editor wrapping and source filename. Formatting options keep that Undo available; ordinary typing clears it. Edits cancel obsolete processing and disable stale exports. Invalid files leave useful input and output intact.
Private processing and limits
CSS is treated as text in a local worker. It is never applied to this page, imports and URLs are not fetched, and nothing is uploaded or saved automatically. Files must use UTF-8, including any @charset declaration. Downloads use UTF-8, LF line endings and a final newline; a leading byte-order mark is removed with a notice.
Input is limited to 1 MiB, output to 4 MiB, parsed CSS nodes to 50,000 and nesting to 100 levels. File reading and formatting have Cancel controls and ten-second deadlines. Very long custom properties remain long to preserve their contents.
Formatting uses Prettier options with a local custom-property preservation step. Prettier license.