Input
Preparing your workspace…
How to use
- Paste CSS, open a UTF-8 file or load Sample.
- Choose indentation or enable Minify CSS, then run the action.
- Review the result and use Copy or Download.
Formatting versus minifying CSS
Formatting makes a stylesheet easier to read and review. Minification removes optional whitespace and ordinary comments to create a smaller text representation.
Both operations parse the input first. The formatter uses Prettier; the minifier uses CSSTree to generate compact syntax rather than performing stylesheet-wide optimization.
Choosing an operation
Format expands the source into consistent indentation and line breaks. Select two or four spaces to match the surrounding project.
Minify compacts valid CSS while retaining required spacing and license comments beginning with an exclamation mark. Its output can still contain information that a separate optimizer could simplify.
.card { color: red; padding: 8px; }.card{color:red;padding:8px}A compact-syntax illustration; select Minify CSS to produce this form.
Parsing and transformation limits
This tool does not remove unused selectors, merge rules, rewrite asset URLs or fetch imports. Keep the stylesheet in its original application context when testing the result.
The input is CSS, not a Sass or Less program. Parser errors are reported, and a previous result cannot be exported after the source or settings have changed.
Exporting a stylesheet
Copy exports the complete current result; Download saves styles.css. Neither action edits your source file or installs the stylesheet in a project.
Text input up to 1 MiB. CSS and HTML transformations run in a worker with a 30-second limit. Color tools use sRGB; generated styles are previews and require testing in your own layout.
Frequently asked questions
Does minification remove unused CSS?
No. It compacts syntax without analyzing HTML or deciding which selectors are used.
Are license comments retained?
Minification retains comments beginning with /*! while removing ordinary comments. Review the output if your project has additional notice requirements.
Can I paste Sass or Less?
The tool parses CSS and does not run a Sass or Less compiler. Compile preprocessor source before using it here.
Why is Copy disabled after I edit the input?
The displayed output belongs to the previous source or settings. Run the selected operation again to produce a current result.
Is my stylesheet uploaded?
No. Parsing and transformation take place in your browser. Opening a text file reads it locally; Download creates a new output file.