Skip to content
Developer & CodeLocal · Stays on device

CSS Formatter

Beautify CSS with consistent indentation, one selector per line and blank lines between rules, after checking for unbalanced braces.

Launch CSS Formatter
  • CSS, Minified CSS
  • Free to use
  • No sign-up or watermark
css-formatterOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
CSSMinified CSS
Open CSS Formatter

About this tool

Paste minified or messy CSS and get it back with every declaration on its own line, nested @media and @supports blocks indented, and selectors in a list split onto separate lines. Choose 2 spaces, 4 spaces or tabs, and whether to leave a blank line between rules.

Before formatting, the CSS is checked for the mistakes that silently break stylesheets: braces, brackets or parentheses that don’t match, strings that are never closed, and comments without a closing */. If one is found you get its line and column instead of reformatted output that hides the problem. Comments, custom properties and values are kept exactly as written. Everything runs in your browser. Your data is never uploaded, logged or stored.

  1. Input

    Your code or text

    CSS, Minified CSS

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelinejs-beautify (MIT)

How to use it

  1. 1

    Paste your CSS.

  2. 2

    Pick the indentation and layout options.

  3. 3

    Fix any reported error, then copy or download the formatted CSS.

Zero-upload architecture

How to use CSS Formatter for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open CSS Formatter

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Pick the indentation and layout options.

  3. 3

    Get your result

    Fix any reported error, then copy or download the formatted CSS.

  • Local

    CSS Minifier

    Minify CSS for production with csso: remove whitespace and comments, shorten colours and values, and merge rules, with before/after and gzip sizes.

    Open tool
  • Local

    HTML Formatter

    Beautify HTML with configurable indentation, line wrapping and attribute layout, without ever rendering or running it.

    Open tool
  • Local

    JavaScript Formatter

    Beautify minified or messy JavaScript with configurable indentation and brace style, plus a syntax check that parses the code without running it.

    Open tool
  • Local

    JSON Formatter

    Pretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.

    Open tool