Category: Developer

CSS Formatter

Format CSS, SCSS or Less with syntax-aware indentation and line wrapping.

Runs in your browserProcessed locally. Your input never leaves your device.

Layout

Details

About this tool

Choose CSS, SCSS or Less, paste a stylesheet and receive consistently formatted rules, selectors, declarations and nested blocks. Control indentation, preferred line length and quote style.

Selecting the correct syntax is important because SCSS and Less add variables, interpolation, mixins and nesting that plain CSS cannot parse. Syntax errors are reported instead of being hidden by cosmetic whitespace changes.

Formatting is performed locally in the browser, so the stylesheet stays on your device.

Keep going

  • Format and beautify HTML fragments or full documents with HTML-specific controls.

    Runs in your browserDeveloper
  • Format and beautify JavaScript with configurable indentation, quotes and semicolons.

    Runs in your browserDeveloper
  • Write Markdown and see a safe, live preview with tables, task lists and code blocks.

    Runs in your browserDeveloper

Good to know

Questions people actually ask

Is this a real CSS, SCSS and Less parser?
Yes. The tool uses Prettier's PostCSS parser, not regular expressions or a generic indentation algorithm.
Is the source code uploaded?
No. Parsing and formatting run in the browser. The language engine is loaded on demand and the source stays on the device.
Can formatting change program behaviour?
The formatter is designed to preserve the parsed program while normalising the selected stylesheet syntax. Review a diff before committing, especially when a repository enforces different style rules.