CSS Formatter
Pretty-print CSS with proper indentation and structure.
$css input
0 chars1 lines
$formatted[READY]
0 chars1 lines
Related Tools
FAQ
- Does the CSS formatter handle media queries?
- Yes. The formatter properly handles nested at-rules like @media, @keyframes, @supports, and @layer, indenting the rules inside them at an additional level.
- Will it remove my CSS comments?
- No. The formatter preserves /* */ comments in the output. If you want to remove comments, use the CSS Minifier tool instead.
- Can I format CSS with custom properties (variables)?
- Yes. CSS custom properties (--my-var: value) are treated as regular properties and formatted correctly with the same indentation rules.
The CSS Formatter takes minified or poorly formatted CSS and reformats it with consistent indentation, newlines after braces and properties, and proper structure. Handles nested rules like media queries and keyframe blocks. Makes CSS easy to read, edit, and review. Works entirely in your browser with no data sent to servers.