Format, minify and clean up CSS in your browser. Pretty-print rules, compress stylesheets, remove empty blocks and copy the result. Free, no upload.
CSS Formatter turns messy or minified stylesheets into readable code — and the other way round. Paste your CSS, choose a layout mode and the result appears on the right. Everything runs locally in your browser; no code ever leaves your machine.
Two panels sit side by side: the CSS input on the left and the formatted result on the right. The toolbar underneath holds two checkboxes and three buttons. On phones the panels stack vertically.
Paste or type your CSS into the left panel. Syntax highlighting marks selectors, properties, values and comments so structure is easy to follow.
Horizontal (default) keeps one rule per line with all of its declarations inline, e.g. body{margin:0;font-size:12px;}. Clear this option to switch to vertical mode, where each declaration gets its own indented line — easier to read and edit by hand.
"Strip comments" is on by default: /* ... */ blocks are removed while formatting or minifying. Turn it off to keep them.
All styles and scripts are scoped to the .cstool container, so the widget can be embedded in any page without leaking styles. The layout adapts to mobile, where buttons stretch to full width.
Restoring readability to a minified file, keeping a team on one code style, or producing clean code snippets for documentation and tutorials.