AI Tools Free

CSS Minifier

Minify a CSS stylesheet online and compare its source and output byte counts. Choose license-comment handling, then copy or download the compact CSS; rule restructuring is disabled.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Minify CSS.

Your result
Enter your details

Result will appear here

How CSS Minifier works

The minifier checks strings and bracket balance, then compacts parsed CSS with rule restructuring disabled and the selected comment policy.

The result reports UTF-8 byte totals and supplies the CSS text for copy or download. Test the output with the actual stylesheet before replacing a deployed file.

Unfinished strings, comments, or unmatched brackets can stop processing.

A readable CSS stylesheet connected to its compact text representation.
Illustration of the CSS Minifier workflow.

How to use CSS Minifier

Paste CSS source and choose whether license style comments should remain.

Set CSS and comment policy

Paste the stylesheet and choose whether /*! license comments should remain. Close strings, comments, and brackets in the source before processing, and retain the original for comparison.

CSS
CSS Minifier native input panel with the actual CSS, Comments settings used for this example.
Configure CSS, Comments; select Minify CSS.

Minify the representation

Run the minifier and inspect the output byte total with original bytes and bytes saved. The result text keeps rule order because restructuring is disabled.

66 bytes
CSS Minifier actual result panel showing 66 bytes.
Submitted result: 66 bytes. Original bytes: 87.

Copy or download and test

Copy the text or download minified.css, then review the real stylesheet rendering. Read the quoted-content and disabled-restructuring note. Byte reduction does not replace a check of the intended cascade.

Output and export
CSS Minifier actual output and export region and result note after submitting the pictured settings.
Review the actual CSS Minifier output and visible Copy result, Download minified.css controls. Read the result note.

When to use CSS Minifier

Minify a stylesheet copy while retaining a readable source for future edits.

Prepare a stylesheet copy

Create a compact version of a reviewed stylesheet for a build or static asset workflow. Continue editing the readable source instead of the minified file. Check that any links to fonts and images still resolve from the final asset location.

Developer input and configuration represented by document cards.
Prepare the input. Concept illustration.

Measure CSS source reduction

Compare the reported UTF-8 source bytes before and after minification for this input. Use those numbers for the stylesheet transformation only. Browser caching, transport compression, other assets, and rendering behavior are separate parts of an actual page performance assessment.

A developer example flowing from input to reviewed output.
Inspect an example. Concept illustration.

Check a third party excerpt

Process a CSS excerpt when evaluating how its comments and syntax are handled. Preserve required attribution where appropriate and test the resulting rules in context. Successful minification does not establish that an unfamiliar stylesheet is compatible with your component.

Developer output handed to the next stage of a workflow.
Use the result in your workflow. Concept illustration.

Review CSS minification and optimization limits

Review the compact stylesheet and retained comments before substituting it in a page.

The minifier does not use rule restructuring in this configuration. Strings and references remain source content; imports and URLs are not fetched or checked for availability.

A compact stylesheet is not a compatibility report. Its appearance and effect still depend on the browser, document, cascade, and other styles applied to the same elements.

A developer result reviewed alongside its source.
Review the returned output. Concept illustration.

Check syntax and unexpected output

Resolve unfinished source syntax and test the resulting stylesheet with its actual imports and referenced assets.

Unfinished strings, comments, or unmatched brackets can stop processing. Check the original around the reported area and use complete rules rather than a cut off clipboard excerpt.

Input is bounded at 100000 characters and processing has a time budget. If an application behaves differently with the output, compare the original rules and test the actual styled elements.

Input format and assumptions reviewed for a developer task.
Check format and assumptions. Concept illustration.

Minify and download a CSS stylesheet

Paste CSS source and choose whether license style comments should remain.

Minify CSS

CSS Minifier: common questions

Answers about using CSS Minifier and understanding its results.

Are quoted strings stripped?

No. String contents are parsed as strings rather than removed as comments.

Does it combine or reorder rules?

Rule restructuring is disabled.

Can I keep license comments?

Yes. Choose the option to keep comments beginning with /*!; the other mode removes comments.

Does it fetch imported stylesheets?

No. Imports and URLs remain references in the CSS source. The output does not include the contents of those external resources.