Format, minify, and validate CSS with sorting and SCSS conversion.
Free online CSS formatter and beautifier. Paste your CSS, choose indentation style (2 or 4 spaces, tabs), and format instantly. Minify CSS for production use, validate syntax with error detection, convert CSS to SCSS syntax, sort properties alphabetically, or add vendor prefixes automatically. Extracts and lists all custom properties (CSS variables). Formats embedded CSS in HTML and JSX automatically. Runs entirely in your browser — no data is ever sent to a server.
Keywords: css formatter, css formatter online, css beautifier, css minifier, css validator, format css online, css prettifier, css beautify, css indent, css pretty print, css minify online, css to scss, css to sass, scss converter, css property sorter, css autoprefixer, css variables extractor, beautify css, minify css, css code formatter, css formatter free, online css beautifier
Tags: css, format, beautify, minify, validate, prettify, scss, autoprefixer
Paste your CSS into the input area on the left, or upload a .css file using the upload button. You can also drag and drop a file directly onto the input area.
Choose your indentation style — 2 spaces, 4 spaces, or tabs — to match your team's coding standards.
Optionally enable Sort Properties to alphabetically order CSS properties within each rule for consistent, diff-friendly output.
Click the Format button or press ⌘↵ (Mac) / Ctrl+Enter (Windows) to beautify your CSS instantly with syntax highlighting.
Use Minify to collapse the CSS to a single line for production embedding, Validate to check for syntax errors, → SCSS to convert to Sass syntax, Sort Props for alphabetical ordering, or Autoprefix to add vendor prefixes.
Copy the formatted output with ⌘⇧C, download it as a .css file, or use the Share button to generate a gzip-compressed shareable URL.
CSS formatter with configurable indentation: 2 spaces, 4 spaces, or tabs to match your team's coding standards.
Sort Properties option: alphabetically reorders all CSS properties within each rule for consistent, diff-friendly, and code-review-friendly output.
CSS minifier: collapses formatted CSS to a single line by removing whitespace and comments for production use.
CSS validator with syntax error detection: unbalanced braces, invalid property syntax, missing semicolons, and malformed at-rules with line/column positions.
CSS to SCSS converter: transforms standard CSS into Sass syntax, converting @media rules to @include, expanding shorthand properties, and handling nested selectors appropriately.
Property sorter: alphabetically orders CSS properties within each rule block using the recommended ordering convention (positioning, box model, visual, typography, animation).
Vendor autoprefixer: automatically adds -webkit-, -moz-, -ms-, and -o- prefixes to CSS properties that require them for cross-browser compatibility.
CSS variables extractor: lists all custom properties (--variable-name) defined in your CSS with their values for easy reference and reuse.
Syntax highlighting with color-coded selectors, properties, values, at-rules, comments, and custom properties.
CSS statistics: rule count, property count, nesting depth, and output byte size displayed as meta badges.
Shareable URLs: gzip-compresses your CSS into a URL parameter so you can share stylesheets with teammates.
Works entirely in your browser — no CSS is ever sent to any server. Your stylesheets stay completely private.
Keyboard shortcuts for power users: ⌘⇧F to format, ⌘⇧M to minify, ⌘⇧V to validate, ⌘⇧K to clear.
Large-input warning with byte count — alerts you when the input may slow down formatting.
Auto-format on type: toggle live formatting as you type with the Auto Format checkbox.