Loading...
Loading...
We use cookies to enhance your experience, analyze site usage, and serve personalized content. By clicking "Accept All," you consent to our use of cookies. See our Cookie Policy and Privacy Policy for details.
Format, beautify, and minify CSS code online free
Formats and beautifies CSS code with three output modes (expanded, compact, compressed). Includes options to sort properties alphabetically or by type, sort selectors alphabetically, remove duplicate rules and properties, strip comments, control vendor prefix ordering, and convert color formats (HEX to RGBA, HSL, or named colors).
CSS codebases maintained by multiple developers quickly accumulate inconsistent formatting, duplicates, and mixed color formats. A comprehensive formatter restores consistency, reduces file size, and makes code easier to navigate without altering behavior.
Frontend developers maintaining large CSS/SCSS codebases, teams enforcing style guidelines, web designers cleaning up exported CSS, and anyone bundling CSS for production.
Paste CSS or upload a .css file via drag-and-drop
Select output format: Expanded (one prop per line), Compact (one line per rule), or Compressed (single line)
Configure sorting: toggle 'Sort Properties' (Alphabetical or By Type), 'Sort Selectors', and 'Remove Duplicates'
Enable 'Remove Comments' and configure 'Vendor Prefix Order' to your preferred standard
Use color format converter — choose target format and all matching colors are converted
Click 'Format' — output appears with summary of changes (sorted, comments removed, duplicates eliminated)
Copy formatted CSS or download as .css file
Input: 'a{color:#ff6600;margin:0;padding:0;color:#f60}' | Expanded + Sort + Remove Dupes => Output: 'a {\n color: #ff6600;\n margin: 0;\n padding: 0;\n}'Input: '/* comment */ .foo{background:red}' | Compressed + Strip Comments => Output: '.foo{background:red}'Standard CSS only. Pre-compile SCSS first.
Spec-Compliant: -webkit-, -moz-, -ms-, -o-. Alphabetical: -moz-, -ms-, -o-, -webkit-.
No, applies to ALL matching colors. Edit manually for selective conversion.
Valid CSS is preserved. Invalid CSS may be dropped.
Format, validate, and minify JSON data with syntax highlighting
Format and beautify SQL queries with syntax validation
Minify, beautify, and validate JavaScript code with customizable options
Format, validate, and minify HTML code online free
Dive deeper with our comprehensive guides and tutorials.