CSS Formatter/Minifier

Pretty-print or minify CSS. All in your browser.

Try it with this example

Paste minified CSS and format it with proper indentation. Or minify formatted CSS for production.

What is this tool?

CSS from minifiers or legacy code often arrives as a single line—selectors, rules, and values jammed together. Reading or editing it is painful. The CSS Formatter pretty-prints CSS with indentation and line breaks. Paste minified CSS and get readable, structured output. Need to shrink it for production? The tool also minifies: strip whitespace and newlines to reduce file size. Format for development, minify for deployment—all in one place.

Formatting adds indentation to nested rules (e.g. inside media queries), places each property on its own line, and aligns values for consistency. The result is easier to diff, easier to review, and easier to maintain. Minifying does the opposite: remove unnecessary whitespace, collapse rules where safe. Some minifiers also rename selectors or shorten colors—this tool focuses on whitespace and structure, keeping the CSS functionally identical.

All processing runs in your browser. Your CSS never leaves your device. Paste large stylesheets or small snippets; the tool handles both. If the input has syntax errors, the formatter may fail or produce partial output—fix the syntax first. For valid CSS, it's fast and reliable.

Use it when inheriting minified CSS and needing to understand it, when preparing a stylesheet for a pull request, or when you want a quick minified build without a full pipeline. For production sites, a build tool (e.g. PostCSS, cssnano) may offer more optimizations, but for quick formatting and minification, this tool delivers.

Bookmark it for the next minified CSS file you need to read.