How to Use the CSS Minifier Online
- 1Paste the CSS you want to make compact. Keep a readable source copy nearby so you can compare every declaration afterwards.
- 2Inspect the result where selectors and declarations meet. The tool removes whitespace around common punctuation and the last semicolon before a closing brace.
- 3Check comment markers, strings, and custom property values against the source if another system reads those parts directly.
- 4Copy the compact CSS and try it in the context where it will be used. Compare the computed styles if you are replacing a working snippet.
Input & Output Examples
The comment, line breaks, and final declaration semicolon disappear.
/* Small card */
.card {
padding: 1rem;
color: #123;
}.card{padding:1rem;color:#123}The group selector becomes more compact while the spaces separating the margin values remain.
h2,
.subtitle {
margin: 0 0 1rem;
}h2,.subtitle{margin:0 0 1rem}Practical Developer Workflows
- Create a single-line stylesheet fixture for a test that compares raw output from an example component.
- Trim presentation whitespace from a small static style rule you need to embed in a plain-text example.
- Compare the compact and readable versions of a selector group before sharing the shorter version in a demo.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.