CSS Minification Test
The CSS Minification Test inspects every external and inline stylesheet served by a URL and reports whether each is minified for production. Un-minified CSS contains comments, whitespace, indentation and verbose selectors that bloat the file by 20-40% with zero visual or functional difference. Minification is a one-line build-step change that immediately speeds up FCP, LCP and Speed Index by reducing render-blocking CSS bytes.
What This Tool Checks
- Minification status of every external CSS file
- Minification status of inline <style> blocks
- Bytes saved per file by minifying
- Comments and whitespace overhead
- CSS source maps in production
- Per-file compression ratio after Brotli
Why It Matters for SEO
CSS is render-blocking — every byte delays first paint. Un-minified CSS can be 30% larger than necessary, directly slowing FCP and LCP. Modern build tools (esbuild, Vite, webpack, PostCSS) ship minification as a default, so un-minified CSS in production almost always means a misconfigured build. The fix is one config flag and produces an instant, measurable speed improvement.
How to Fix It
Enable CSS minification in your production build (esbuild --minify, Vite default, webpack TerserPlugin / CssMinimizerPlugin). Strip source maps from production responses. Minify inline <style> blocks at build time. Re-test until every CSS file is minified and source maps are excluded from production.
How It Works
We fetch every stylesheet linked from the page, measure its raw byte count, then re-minify it through a CSS minifier and compare. The byte savings are reported per file along with the build-pipeline change needed to fix it.
Common Mistakes to Avoid
- Source CSS deployed to production (no build step)
- Build pipeline minifies HTML and JS but not CSS
- Production source maps exposed (bloat plus security concern)
- Inline <style> blocks not minified
- Multiple stylesheets that should be bundled and minified together
Quick Checklist
- Every external CSS minified in production
- Inline <style> blocks minified
- No source maps exposed in production
- CSS bundled where appropriate
- Brotli or gzip enabled on top of minification