Minimo Digital
Minimo Digital

Critical CSS Extractor

Fetch a page and extract CSS rules that match elements in its DOM.

How to Extract Critical CSS?

  1. Enter the URL of the page you want to optimize.
  2. Click Extract to fetch the page and analyze CSS.
  3. View the extracted critical (above-the-fold) CSS rules.
  4. Inline this CSS in your page's <head> for faster rendering.
  5. Load the full CSS asynchronously for better performance.

Critical CSS Extractor — Improve Page Speed

Extract the above-the-fold CSS needed to render your page's initial view instantly. Critical CSS is the minimal set of styles required to display content visible without scrolling. Inlining it directly in your HTML <head> eliminates render-blocking stylesheet requests and dramatically improves perceived load time and Core Web Vitals scores.

Why Critical CSS Matters

  • Faster First Contentful Paint (FCP) — Users see styled content in milliseconds, not after the full CSS loads
  • Better Lighthouse / CrUX Scores — Reduces render-blocking resources, a key PageSpeed metric
  • Improved SEO — Google uses Core Web Vitals as a ranking signal

Implementation

Inline the extracted CSS in a <style> tag in your <head>, then load the full stylesheet asynchronously using rel="preload" or a JavaScript loader.

How to Use the Extracted CSS to Speed Up Rendering

A large stylesheet can delay the first paint because the browser must download it before showing anything. This tool fetches a page, collects its stylesheets and returns only the rules whose selectors match elements that exist in that page's HTML. You can use the result as a starting point for inlined CSS.

Step by step

  1. Type the full address, including https://, into the URL field.
  2. Click Extract. The server downloads the HTML, every linked stylesheet and every inline <style> block.
  3. Read the output below the form. Each line is a selector followed by its declarations.
  4. Paste the output into a <style> tag in your page head and load the full stylesheet separately.

Worked example

Suppose a page has an <h1 class="title"> and its stylesheet contains .title{font-size:2rem}, body{margin:0} and .modal{display:none}, but no element uses the class modal. The output will be two lines, .title {font-size:2rem} and body {margin:0}. The unused .modal rule is left out.

Limits and common mistakes

  • The tool matches against the whole document, not just the visible part of the screen, so the result is closer to "CSS used by this page" than to a true above-the-fold set. Trim it by hand if you need less.
  • Only the HTML the server receives is checked. Elements created later by JavaScript are not seen, so their styles may be missing.
  • Selectors are converted in a simplified way. Pseudo-classes such as :hover, attribute selectors and rules inside @media or @keyframes blocks may not be matched. Check the output before shipping it.
  • If the page cannot be fetched, the output box stays empty.
  • Always test the page afterwards, because a missing rule shows up as a visual glitch.

Images also slow first paint, so see the image lazy load tool as well.

Frequently Asked Questions

What is critical CSS?

Critical CSS is the minimal subset of your stylesheet needed to render the above-the-fold content of a page — what the user sees without scrolling. Inlining it eliminates a render-blocking network request and makes pages appear to load faster.

How do I use the extracted critical CSS?

Copy the output and paste it inside a <style> tag in your HTML <head>. Then load your full CSS file asynchronously: add rel="preload" as="style" to your <link> tag and use a JS snippet to switch it to rel="stylesheet" after load.

Will the extracted CSS cover my entire page?

No — critical CSS only covers above-the-fold content visible at the specified viewport. Styles for below-the-fold content and interactive elements are intentionally excluded; they should still be loaded via your full stylesheet.

Does this tool work with CSS-in-JS or Tailwind?

This tool works by fetching the rendered page and analyzing its computed styles. It works regardless of how CSS is generated — traditional stylesheets, Tailwind, CSS-in-JS — as long as the page URL is publicly accessible.

Support Minimo Digital

Help keep these tools free for everyone ā˜•