No tool matches “”

Try a format (“webp”, “mp3”) or a verb (“merge”, “compress”).

Loading index

↵to open

Developer Tools · Updated November 8, 2026 · Reviewed by FormatFlow Editorial

CSS Formatter & Minifier

You can format or minify CSS in your browser with the Prettier PostCSS parser, choose the indentation, and see parse errors with the line and column that caused them.

Runs in your browserFree · No sign-up · No watermark
CSSRuns in your browser
Loading the tool…

Everything runs locally in this tab. No file is uploaded while the tool loads.

This tool runs in your tab. Nothing is uploaded and no copy is stored.

How files are handled

Key facts

Category
Developer Tools
Processing
In your browser — nothing is uploaded
Input formats
CSS
Output format
CSS
Maximum size
Bound by the memory available to your browser tab
Requirements
Chrome, Edge, Firefox or Safari · JavaScript enabled
Price
Free, no account, no watermark
Last updated
Nov 8, 2026

SummaryCSS Formatter is a free online developer tools tool. You can format or minify CSS in your browser with the Prettier PostCSS parser, choose the indentation, and see parse errors with the line and column that caused them. Stylesheets grow by accretion: a rule added here, a vendor prefix there, and suddenly the file has three indentation styles and declarations in no particular order. This formatter parses the stylesheet with Prettier's PostCSS parser and prints it with consistent indentation, so selectors, at-rules and declarations are easy to scan and review. It runs in your browser — nothing is uploaded. It accepts CSS and produces CSS. The maximum size is bound by the memory available to your browser tab. Plain CSS only: SCSS, LESS and other preprocessor syntax are not supported. Minify removes comments, including licence headers; keep the original when those comments must ship.

At a glance

Formats
CSS → CSS
Processing
In your browser
Max size
Device memory bound
Price
Free, no account
Updated
November 8, 2026
All Developer Tools

About CSS Formatter

Stylesheets grow by accretion: a rule added here, a vendor prefix there, and suddenly the file has three indentation styles and declarations in no particular order. This formatter parses the stylesheet with Prettier's PostCSS parser and prints it with consistent indentation, so selectors, at-rules and declarations are easy to scan and review.

Minify goes the other way: it removes comments, collapses whitespace and tightens punctuation while leaving strings, URLs and the spaces that value functions such as calc and custom properties need. Both modes run locally, both report parse errors with a line and column, and both refuse input over 10 MB.

What this tool does

The details that matter when you use CSS Formatter for real work.
  • Real CSS parser

    Formatting uses Prettier's PostCSS parser, which understands at-rules, nested blocks, comments and declaration values instead of splitting on braces.

  • Two- or four-space indent

    Choose the indentation used by the project; the formatted output follows it consistently for every rule and at-rule.

  • Minify that respects values

    Minify removes comments and redundant whitespace while keeping strings, URLs and the spaces that calc and custom properties require.

  • Parser errors with position

    When the stylesheet cannot be parsed, the message includes the line and column, so a missing brace or bad at-rule is quick to locate.

  • Copy and download

    Copy the formatted or minified CSS or download it as a .css file, ready to paste into a project or a build step.

  • Runs in the browser

    No upload and no server round trip: the stylesheet is parsed and printed by a plugin loaded into the page.

How to use CSS Formatter

No account, no installation — the whole job happens in this browser tab.
  1. 01

    Paste or load CSS

    Paste the stylesheet into the input pane or load a .css file from your device, up to 10 MB.

  2. 02

    Choose the indentation

    Select two spaces or four spaces for the formatted output; minify ignores indentation and produces a compact result.

  3. 03

    Format or minify

    Press Format to pretty-print the stylesheet or Minify to remove comments and redundant whitespace. The CSS is parsed first and errors are reported.

  4. 04

    Review the result

    Check the output and the line count, and fix any parser error shown with its line and column before copying.

  5. 05

    Copy or download

    Copy the CSS to the clipboard or download it as a .css file, then run it through the project pipeline as usual.

Supported formats and limits

Input
CSS
Output
CSS
Processing
Client-side, in your browser. Nothing is uploaded.
Maximum size
Bound by the memory available to your browser tab.
Requirements
Chrome, Edge, Firefox or Safari · JavaScript enabled

Limitations worth knowing

  • Plain CSS only: SCSS, LESS and other preprocessor syntax are not supported.
  • Minify removes comments, including licence headers; keep the original when those comments must ship.
  • The PostCSS parser is permissive, so some invalid values are normalised rather than rejected; the output is not a CSS validator.
  • Input is capped at 10 MB and formatting runs on the main thread after a short yield.

Privacy and file handling

Your CSS is read, parsed and printed entirely inside this browser tab with Prettier loaded as a page script. The stylesheet is never uploaded to FormatFlow or anyone else, no copy is stored and nothing leaves your device; closing the page clears the input and the result.

Read the full privacy policy

CSS Formatter FAQ

Short, direct answers to the questions people ask before using this tool.
What parser does the formatter use?
It uses Prettier's PostCSS parser and printer inside the page. That means at-rules, nested rules, comments and declarations are parsed properly, and formatting follows the same rules a Prettier user would see in an editor.
What does Minify keep intact?
Strings, URL contents and spaces that matter inside value functions are preserved. Comments and redundant whitespace are removed, and punctuation such as braces, semicolons, commas and selector combinators is tightened.
Why does a stylesheet fail to parse?
The common causes are an unclosed block, a missing semicolon before another rule, an invalid at-rule or a broken declaration value. The reported line and column point at the place where the parser could not continue.
Can minify break calc or custom property values?
The minifier is designed to keep the spaces that calc expressions and custom property values need, and it copies strings and URLs unchanged. Always review the minified output, especially for hand-written values, because CSS value syntax is unusually permissive.
Are comments kept when formatting?
Yes, Format keeps comments in the output. Minify removes them, so keep a commented copy if those notes are documentation you still need.
Does this format SCSS or LESS?
No. The parser is configured for plain CSS; preprocessor syntax such as nesting with variables, mixins or interpolation is not supported and is reported as a parse error. Compile the preprocessor file to CSS first.
Is my stylesheet uploaded?
No. The file is read locally, parsed by the plugin loaded into the page and printed in the browser tab. Nothing is uploaded, stored or logged, and closing the page clears the input and the result.
What are the limits for CSS files?
Input is capped at 10 MB of CSS. Large stylesheets take longer because parsing and printing happen in the tab, and minify keeps the file on one line rather than splitting it.

Background reading

Format guides that explain the trade-offs behind CSS Formatter.