Ctrl / ⌘ + Enter to format

Formatting options

Example output is ready. Edit either panel or paste your code to begin.

Local processing · Up to 200,000 input characters

Tab indents · Esc, then Tab moves focus Ln 1, Col 1

Paste code here. Formatting never executes it.

Tab indents · Esc, then Tab moves focus Ln 1, Col 1
CSS

Output is editable. Copy and download use its current contents.

Format CSS without changing the cascade

The CSS formatter uses Prettier’s CSS parser to lay out selectors, declarations, functions, custom properties, and at-rules. It keeps rule order; formatting is not a minifier, autoprefixer, or property sorter.

How to beautify a stylesheet

  1. Paste CSS, without HTML <style> tags.
  2. Choose indentation and your preferred line width.
  3. Select Format CSS and copy the readable stylesheet or download a .css file.

Try a responsive card

The example includes a custom color property, a shared selector, and a media query. The formatter puts declarations on separate lines and indents the nested rule so the responsive behavior is easier to inspect.

What does validation cover?

Structural parse errors are reported with a location when available. This does not check browser support or whether a property name or value is useful. Use the HTML formatter for complete documents. Input is limited to 200,000 characters; cancel a job at any time, and processing stops after ten seconds. Your CSS is not applied to this page.