CSS Formatter
Indent CSS so it is readable, or compact it. Formatting is done by js-beautify in this tab. It does not lint, prefix or rewrite selectors for browser support.
CSS
Limits
- The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
- Not a linter, autoprefixer or Sass/Less compiler.
- Source maps are not generated or updated.
- Very large style sheets may be slow in a small tab.
Formatted CSS
How to use CSS Formatter
- Paste CSSType, paste or load a .css file.
- Choose indent or minifySet the indent size, or minify to remove extra whitespace.
- Copy or downloadCopy the result or download a .css file.
A formatter, not a linter
js-beautify reprints your stylesheet with consistent braces, spacing and indent (or with optional compact output). It does not check that selectors are valid, add vendor prefixes, or convert modern CSS to older syntax.
Syntax errors may survive formatting or produce odd wrapping. SCSS, Less and other preprocessors are not fully supported — some constructs may be treated as plain CSS and wrap poorly.
Frequently asked questions
Is my text or file uploaded?
No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.
Will this fix errors in my CSS?
No. It only changes whitespace and wrapping. Invalid rules stay invalid.
Can I format SCSS?
Nested SCSS often formats acceptably, but this is a CSS beautifier, not a Sass compiler. Some preprocessor syntax may wrap poorly.
Does minify shorten class names?
No. It only removes extra whitespace. Identifiers are not rewritten.
Related tools
All toolsJavaScript Formatter
Pretty-print or compact JavaScript in your browser with js-beautify.
HTML Formatter
Pretty-print or minify HTML in your browser with js-beautify.
JSON Formatter & Validator
Format, minify, sort keys, and catch syntax errors cleanly.
XML Formatter
Pretty-print or minify XML in your browser, without sending it to a server.