Loadingβ¦
Loadingβ¦
Beautify CSS, SCSS, and Less with Prettier, or minify CSS with csso to cut its size. Syntax errors show the line and column, and /*! license */ comments can be kept.
Also covers: CSS formatter Β· CSS beautifier Β· CSS minifier Β· SCSS formatter
The result appears here as you type.
Paste CSS, SCSS, or Less, drop a .css file, or click Sample.
Format re-indents it with Prettier: one declaration per line, consistent spacing. Minify uses csso to strip whitespace and comments, shorten colors and values, and merge duplicate rules.
The footer shows the size before and after. Copy the output or download it as .css or .min.css.
Usually 20β40% before compression, more for heavily commented or hand-written CSS. csso also shortens values (#ff0000 β red, 0px β 0) and, with Merge rules on, combines rules with the same selector or declarations.
csso only merges when it's safe for the cascade, but it can move a rule next to another with the same selector. If specificity or order matters in a tricky spot, turn off Merge rules for a whitespace-and-values-only minify.
No β browsers only understand CSS, so compile Sass or Less to CSS first and minify that. Formatting works for all three.
The minifier silently drops CSS it can't parse, so the tool checks for unbalanced braces, unclosed comments, and unclosed strings first. Otherwise a missing } would quietly delete the rest of your stylesheet.
No. Everything runs in your browser tab, and nothing you paste or open is uploaded or stored.
Data
Format, validate, and minify JSON in your browser. Paste it, upload a file, or load it from a URL. Errors show the exact line and column.
C# / .NET
Paste JSON and get C# model classes or records, ready for System.Text.Json or Newtonsoft.Json. Nested objects, arrays, nullable types, dates, and GUIDs are inferred for you.
SQL
Format and beautify SQL queries for SQL Server (T-SQL), PostgreSQL, MySQL, Oracle, and more. Set the indentation, keyword case, and layout, and get the exact line of any syntax error.
Data
Format, validate, and minify XML (config files, .csproj, SOAP, RSS) in your browser. Entities, CDATA, and mixed content are kept exactly as written, and errors show the line and column.
Data
Format and validate YAML (docker-compose, Kubernetes, GitHub Actions) without losing comments, or convert YAML to JSON. Errors show the exact line and column.
Web
Beautify HTML pages and fragments without changing how they render. Inline spacing, <pre>, and scripts stay intact, and embedded CSS and JavaScript can be formatted too.