<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1" -->

---
title: Is Minifying CSS Necessary? (2023) | daily.dev
description: An analysis argues against minifying CSS, testing whether removing whitespace and comments meaningfully improves performance. Using CSS-Tricks data, minifying...
canonical: https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Is Minifying CSS Necessary? (2023) | daily.dev
og:description: An analysis argues against minifying CSS, testing whether removing whitespace and comments meaningfully improves performance. Using CSS-Tricks data, minifying...
og:url: https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1
og:image: https://api.daily.dev/og/posts/rkdZeFgF1.png
og:image:alt: Is Minifying CSS Necessary? (2023)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Is Minifying CSS Necessary? (2023)

**[Lobsters](https://daily.dev/sources/lobsters)** · 4 min read · 50 upvotes · 16 comments

## Summary

An analysis argues against minifying CSS, testing whether removing whitespace and comments meaningfully improves performance. Using CSS-Tricks data, minifying a large library like Bootstrap only saves about 2 KB after gzip compression compared to gzip alone. Custom parsing benchmarks with 10,000 to 100,000 declaration blocks showed only 9-105ms differences, with realistic 1,000-block stylesheets too fast to measure. A follow-up WebPageTest experiment comparing large and small CSS files, with and without comments, minified and raw, found a worst-case difference of 54ms on a slow, underpowered device. The conclusion is that gzip or Brotli compression alone is sufficient for nearly all sites, and minification mainly sacrifices readability for negligible gains.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://shivjm.blog/is-minifying-css-necessary>

## Questions this post answers

### Does minifying CSS actually make a meaningful difference in page load performance if I'm already using gzip?

No, the difference is negligible in almost all cases. Gzipping Bootstrap's CSS takes it from 147 KB to 22 KB, while minifying before gzipping only shaves off an additional 2 KB, reaching 20 KB. Parsing benchmarks with up to 100,000 declaration blocks showed at most a 10ms difference, and WebPageTest comparisons found a worst-case 54ms gap on a slow, underpowered device.

_Weighing build-pipeline trade-offs like CSS minification gets easier when developers compare real performance data on daily.dev._

### How much does removing whitespace and comments from CSS reduce file size compared to just using gzip compression?

Very little on top of what gzip already achieves. For Bootstrap's CSS, gzip alone compresses 147 KB down to 22 KB, and adding minification before gzipping only brings it down to 20 KB, a difference of roughly 2 KB, which is minor compared to a page's overall compressed payload size.

_daily.dev helps developers keep up with real-world benchmarks before deciding on frontend build steps like minification._

### How long does it take a browser to parse a large CSS file with thousands of declaration blocks?

Parsing is extremely fast even at scale: a stylesheet with 10,000 declaration blocks parsed in 9-10 milliseconds, and one with 100,000 blocks parsed in 95-105 milliseconds, regardless of whether whitespace was present. A more typical 1,000-block stylesheet parsed too quickly for any timing difference to be measured.

_Developers benchmarking CSS parsing costs before optimizing their pipeline can find data-driven takes like this on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 13 comments across lobsters (as of 2026-09-02).

**TL;DR:** Discussion largely agrees with the post's data-driven point that CSS minification saves little, but many push back that context (low-end devices, bandwidth-constrained regions) can still make small savings matter, and one commenter picks apart the testing methodology itself.

**Sentiment:** 25% positive · 55% mixed · 20% skeptical

**The case for**

- Some argue gzip/Brotli alone is sufficient and CSS size is negligible compared to JavaScript and other page weight.
- One commenter notes minification can serve a secondary purpose: enabling fairer size comparisons between stylesheets and stripping comments to hide implementation notes.

**The pushback**

- Several point out that billions of users rely on underpowered, low-bandwidth devices where even small savings can matter.
- One commenter argues the article's testing methodology is flawed, with an unrealistic synthetic stylesheet, a broken minified version missing semicolons, and ignored latency effects, likely overstating minification's negligible benefit.
- Some note that no amount of asset minification fixes the deeper problem of bloated, JS-heavy SPAs running poorly on weak devices.

**By community**

- lobsters (mixed): Commenters broadly accept the low-impact conclusion for typical sites but disagree over how much edge-case hardware and methodology flaws undercut it.

**Hottest debate:** Whether the performance argument holds up given the diversity of real-world devices and bandwidth versus whether CSS size is simply negligible next to JavaScript.

**Open questions**

- Would a corrected, more realistic testing methodology still show minification's benefit as negligible?
- How much do savings from minification actually matter for the segment of users on very low-end or bandwidth-constrained devices?

**Highlights**

> I care about minifying the *text* of this site more than the CSS. By the time the viewport is 707px wide, the article text is *double* the normal font size (± some font-size-adjust, depending on your font), so I have to zoom out to 70% or further for comfortable reading. As regards the content: the testing methodology is very bad yielding certainly wrong results; my *feeling* is that a fixed version would show much smaller benefits to minification. (What was measured was also not particularly close to what had been suggested.) The synthetic stylesheet is wildly unrealistically simple, the minified version is *completely broken* (the semicolons are missing), latency effects are ignored even though they’re rather important in practice, the stylesheet is loaded via circuitous route rather than directly… there are enough *really* bad things that I’m not going to attempt to examine it in depth.
> — [chrismorgan on lobsters · 2 points](https://lobste.rs/s/gbucyj/is_minifying_css_necessary_2023#c_nkuifu)

> Minifying CSS has another use case: fair comparison of small stylesheets. E.g. minifying the stylesheets from https://dohliam.github.io/dropin-minimal-css/ is a fairer comparison. That way if a stylesheet looks "big", but has lots of comments, that is good, and shouldn't be considered "big". OTOH if after minification one stylesheet is significantly larger than the other then you have to see whether it offers you any features you'd actually need to use. And a small stylesheet will likely also have fewer rules. Even better if you can (automatically) drop CSS rules that your HTML doesn't use at all. Sure that is not purely textual minification anymore, but it can help reduce and manage complexity. If you're the kind of person that cares about the size of the (minified) stylesheet then it can help avoid making the stylesheets more complicated than necessary. And that can be good not just for performance, but also for future maintenance overhead.
> — [edwintorok on lobsters · 1 points](https://lobste.rs/s/gbucyj/is_minifying_css_necessary_2023#c_nfb0dq)

> Do you serve your websites without Javascript? For most devices, CSS is negligible compared to nearly everything else websites do.
> — [orib on lobsters · 1 points](https://lobste.rs/s/gbucyj/is_minifying_css_necessary_2023#c_r3jeye)

**Source threads**

- [lobsters](https://lobste.rs/s/gbucyj/is_minifying_css_necessary_2023) · 41 points · 13 comments

## Community discussion

Top comments from developers on daily.dev.

**@vladsiu** · 12 upvotes

> It is always necessary to make your page as fast as possible.

**@selfer** · 4 upvotes

> Well if you need to modify and/or read minified css, there are other problems you need to solve first. This approach is why almost everything is getting slower and cumbersome. This tiny optimization is tiny, but it is still an optimization, i.e. step in the right direction. And once you start to argue that the gains are visible only on slower machines/connections then you are a part of the problem with everything getting slower. While hardware gets faster, only new one does. And not everyone can afford a new one. And for those, these optimizations make sense the most.

**@saruultugsazgun** · 3 upvotes

> Why do you have to read the css, unless its development environment ?

**@mishatvoy** · 2 upvotes

> I tested this with Bootstrap myself
>
> Unminified: 282,444 bytes raw, 33,167 bytes gzipped;
> Minified: 232,111 bytes raw, 30,882 bytes gzipped
>
> So yeah, the difference after gzip is only about 2 KB. But I still don't see a reason to give up those 2 KB. Minification is basically free. My build tool does it for me. And I don't really care if production CSS is readable. I have the source code for that
>
> Will 2 KB make a noticeable difference? Probably not. But it's still less data for zero extra work
>
> So why not?

**@yaireo** · 1 upvotes

> it doesn't hurt either. it's a few milliseconds that the build process does automatically anyway.

## Similar posts on daily.dev

- [nh3.dev](https://daily.dev/posts/nh3-dev-fsykz8tgx) · Lobsters · 4 upvotes · 1 comments
- [This website has no class](https://daily.dev/posts/this-website-has-no-class-vi2ohuucz) · Hacker News · 189 upvotes · 18 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#general-programming](https://daily.dev/tags/general-programming), [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Is Minifying CSS Necessary? (2023)","url":"https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1"},"datePublished":"2026-09-01T20:18:59.558Z","dateModified":"2026-09-02T07:28:22.029Z","description":"An analysis argues against minifying CSS, testing whether removing whitespace and comments meaningfully improves performance. Using CSS-Tricks data, minifying...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":16,"discussionUrl":"https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":50},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":16}],"keywords":"webdev,general-programming,css","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Is Minifying CSS Necessary? (2023)"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1","comment":[{"@type":"Comment","text":"It is always necessary to make your page as fast as possible.","datePublished":"2026-09-02T04:18:56.048Z","url":"https://daily.dev/posts/rkdZeFgF1#c-eNTlPvJds","author":{"@type":"Person","name":"Vladislav Siumbeli","url":"https://daily.dev/vladsiu","image":"https://media.daily.dev/image/upload/s--GalxSgjS--/f_auto/v1757768087/avatars/avatar_ezH33Lu6a37KM1SfsCwIx?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12}},{"@type":"Comment","text":"Well if you need to modify and/or read minified css, there are other problems you need to solve first. This approach is why almost everything is getting slower and cumbersome. This tiny optimization is tiny, but it is still an optimization, i.e. step in the right direction. And once you start to argue that the gains are visible only on slower machines/connections then you are a part of the problem with everything getting slower. While hardware gets faster, only new one does. And not everyone can afford a new one. And for those, these optimizations make sense the most.","datePublished":"2026-09-02T08:25:43.204Z","url":"https://daily.dev/posts/rkdZeFgF1#c-J6l7UX4vQ","author":{"@type":"Person","name":"Ondřej Kuchař","url":"https://daily.dev/selfer","image":"https://lh3.googleusercontent.com/a/ACg8ocKm8ElugzcbefBnkAxe980WrUVuiFjTbHhMzIcemQI1fEPWxg=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"Why do you have to read the css, unless its development environment ?","datePublished":"2026-09-02T02:36:46.482Z","url":"https://daily.dev/posts/rkdZeFgF1#c-fUfGnbfqV","author":{"@type":"Person","name":"Saruultugs Azgun","url":"https://daily.dev/saruultugsazgun","image":"https://lh3.googleusercontent.com/a/ACg8ocJIrwuBJd7Yv13vvSVDPnq8qjdNJc_4sUU833eXyHU9ksTpUMk=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"I tested this with Bootstrap myself\nUnminified: 282,444 bytes raw, 33,167 bytes gzipped;\nMinified: 232,111 bytes raw, 30,882 bytes gzipped\nSo yeah, the difference after gzip is only about 2 KB. But I still don’t see a reason to give up those 2 KB. Minification is basically free. My build tool does it for me. And I don’t really care if production CSS is readable. I have the source code for that\nWill 2 KB make a noticeable difference? Probably not. But it’s still less data for zero extra work\nSo why not?","datePublished":"2026-09-02T10:37:56.023Z","dateModified":"2026-09-02T10:38:52.627Z","url":"https://daily.dev/posts/rkdZeFgF1#c-kNRVbL2zm","author":{"@type":"Person","name":"Mikhail","url":"https://daily.dev/mishatvoy","image":"https://avatars.githubusercontent.com/u/74988200?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"it doesn’t hurt either. it’s a few milliseconds that the build process does automatically anyway.","datePublished":"2026-09-02T07:57:21.070Z","url":"https://daily.dev/posts/rkdZeFgF1#c-RiMZdT4tD","author":{"@type":"Person","name":"Yair Even Or","url":"https://daily.dev/yaireo","image":"https://avatars.githubusercontent.com/u/845031?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/is-minifying-css-necessary-2023--rkdzefgf1#faq","mainEntity":[{"@type":"Question","name":"Does minifying CSS actually make a meaningful difference in page load performance if I'm already using gzip?","acceptedAnswer":{"@type":"Answer","text":"No, the difference is negligible in almost all cases. Gzipping Bootstrap's CSS takes it from 147 KB to 22 KB, while minifying before gzipping only shaves off an additional 2 KB, reaching 20 KB. Parsing benchmarks with up to 100,000 declaration blocks showed at most a 10ms difference, and WebPageTest comparisons found a worst-case 54ms gap on a slow, underpowered device. Weighing build-pipeline trade-offs like CSS minification gets easier when developers compare real performance data on daily.dev."}},{"@type":"Question","name":"How much does removing whitespace and comments from CSS reduce file size compared to just using gzip compression?","acceptedAnswer":{"@type":"Answer","text":"Very little on top of what gzip already achieves. For Bootstrap's CSS, gzip alone compresses 147 KB down to 22 KB, and adding minification before gzipping only brings it down to 20 KB, a difference of roughly 2 KB, which is minor compared to a page's overall compressed payload size. daily.dev helps developers keep up with real-world benchmarks before deciding on frontend build steps like minification."}},{"@type":"Question","name":"How long does it take a browser to parse a large CSS file with thousands of declaration blocks?","acceptedAnswer":{"@type":"Answer","text":"Parsing is extremely fast even at scale: a stylesheet with 10,000 declaration blocks parsed in 9-10 milliseconds, and one with 100,000 blocks parsed in 95-105 milliseconds, regardless of whether whitespace was present. A more typical 1,000-block stylesheet parsed too quickly for any timing difference to be measured. Developers benchmarking CSS parsing costs before optimizing their pipeline can find data-driven takes like this on daily.dev."}}]}
```

