Critical CSS for sites on Cloudflare

Fix “Reduce unused CSS” at the edge. No code changes.

We render each page on your site in a real browser, extract only the CSS it needs to paint, and inline it from Cloudflare's edge. Your full stylesheet still loads, it just stops blocking first paint.

Free for one site. No credit card. Works on Cloudflare's free plan.

your-site.com/products/linen-shirt, as served by the Worker
<head>  <meta charset="utf-8">+<style id="critical-css">+  .nav{display:flex;…}.hero{…}.btn{…}+</style>-<link rel="stylesheet" href="/app.css">+<link rel="stylesheet" href="/app.css"+      media="print" onload="this.media='all'"></head>
Inlined
only above-the-fold rules
Deferred
the full stylesheet
Unchanged
on any miss or error

How it works

Set up in about five minutes

The Worker runs in your Cloudflare account, in front of your origin. Nothing on your server changes, and we never see your Cloudflare credentials.

  1. 1

    Add your site

    Sign in and enter your domain. You get an API key and setup instructions written for your site.

  2. 2

    Deploy one Worker

    Install @reduce-unused-css/cloudflare and run wrangler deploy. Or paste our setup prompt into Claude Code, Cursor, or whatever agent already has your Cloudflare access.

    $ npx wrangler deploy
  3. 3

    Every page gets its own CSS

    The first visit to a URL queues a render in the background. After that, its critical CSS is inlined from Cloudflare's cache in a few milliseconds.

Why it's flagged

Your stylesheet is blocking the first paint

Most sites ship one large stylesheet for every page. The browser can't draw anything until it has all of it.

What the audit means
Lighthouse and PageSpeed Insights flag a page when the browser downloads a whole stylesheet but only needs a small part of it before first paint. It's the same thing Chrome DevTools' Coverage tab shows as unused CSS.
Why it costs you score
A render-blocking stylesheet holds back First Contentful Paint and Largest Contentful Paint until the entire file downloads and parses, even when the visible page uses a handful of its rules.
The standard fix, automated
Inline the critical, above-the-fold CSS for each URL and load the rest without blocking. It's the textbook fix, done by hand rarely because every page needs its own. We generate it for every URL automatically.

Under the hood

Safe to turn on in production

Never makes a page slower

On a cache miss, timeout, or error, your page passes through untouched. CSS lookups are capped at 400 ms.

Visitors never wait on a build

Rendering and extraction run in the background. Cached CSS is read from the local Cloudflare colo with no extra request.

Rendered in a real browser

Each URL is loaded in headless Chromium, and selectors are matched against what's actually on screen, not guessed from source.

Careful about what it keeps

Only @font-face rules your CSS uses, every responsive media query, and @supports and @layer blocks walked rule by rule.

No flash of hidden content

Rules that hide elements are always kept. Rulesets let you force selectors for UI a script reveals after load.

Your account, your credentials

Deploy as a Worker on any Cloudflare plan, or as a Snippet on Pro and up. We never hold your Cloudflare keys.

Pricing

Start free, pay as your site grows

A build is one page's critical CSS being generated. Builds are counted per organization each month; unique paths per site. Pages past a limit just aren't optimized. Your site keeps loading normally.

Hobby

Free

  • 100 builds / month
  • 1 site
  • 10 unique paths / site

Starter

$7/month

  • 2,500 builds / month
  • 1 site
  • 500 unique paths / site

Pro

$29/month

  • 10,000 builds / month
  • 3 sites
  • 2,500 unique paths / site

Business

$99/month

  • 30,000 builds / month
  • 10 sites
  • 10,000 unique paths / site

Enterprise

Custom limits, a contract, and support for larger catalogs and many sites.

Contact us

Put critical CSS on autopilot

Add your site, deploy one Worker, and every page gets CSS cut to exactly what it needs to paint.