Lighthouse — Google's performance and SEO audit tool
What is Lighthouse?
Lighthouse is an open-source, automated tool from Google to help improve the quality of web pages (Lighthouse documentation). In PageSpeed Insights it runs diagnostics in four categories: performance, accessibility, best practices, and SEO (PageSpeed Insights documentation). You can run it in Chrome DevTools, from the command line, as a Node module, or through PageSpeed Insights.
Lighthouse generates a score from 0 to 100 for each category, plus detailed recommendations on what to improve.
Audit categories
1. Performance
- Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS) — two of the three Core Web Vitals metrics
- Total Blocking Time (TBT) — a lab stand-in, because a test without a real user can't measure INP
- First Contentful Paint (FCP)
- Speed Index
2. Accessibility
- ARIA roles correctness
- Color contrast
- Form labels
- Heading hierarchy
- Image alt text
3. Best Practices
- HTTPS usage
- Browser console errors
- JavaScript libraries with known vulnerabilities
- Image aspect ratio
4. SEO
- Meta tags (title, description)
- Viewport meta tag
- Crawlable links
- robots.txt validity
The SEO category in Lighthouse only checks the technical basics of a single page — it can't see the site's indexing status, link profile, or competitors. A full SEO audit starts with Search Console and a crawl of the whole site.
Scoring
| Score | Status |
|---|---|
| 90-100 | Good (green) |
| 50-89 | Needs Improvement (orange) |
| 0-49 | Poor (red) |
The performance score is a weighted average. In Lighthouse 10 the weights are: TBT 30%, LCP 25%, CLS 25%, FCP 10%, Speed Index 10% (Lighthouse performance scoring). The same documentation notes that a perfect score of 100 is extremely challenging to achieve and not expected.
Lighthouse vs PageSpeed Insights vs CrUX
- Lighthouse — lab data (controlled environment, single test run)
- PageSpeed Insights (PSI) — Lighthouse on the web plus CrUX field data (real users)
- Chrome User Experience Report (CrUX) — field data from real Chrome users (last 28 days)
Lab vs field: a lab test simulates one device under fixed network conditions. Field data shows what users actually experience across many devices and connections, so the two can differ.
The Core Web Vitals report in Search Console uses CrUX field data, and Google recommends achieving good Core Web Vitals for success with Search (Google's documentation on Core Web Vitals). Lab data from Lighthouse is for diagnosis. We cover the difference in more depth in our piece on field vs lab data in PageSpeed Insights.
How to run Lighthouse
Chrome DevTools
- F12 → Lighthouse tab → Analyze page load
- Options: mobile or desktop, choice of categories
CLI
npm install -g lighthouse
lighthouse https://example.com --view --preset=desktop
Node module
const lighthouse = require('lighthouse');
const result = await lighthouse(url, { onlyCategories: ['performance'] });
Automation
- Lighthouse CI (
@lhci/cli) — automated audits on every change to the repository - PageSpeed Insights API — CrUX and Lighthouse data fetched programmatically, including for many URLs
Performance optimization checklist
- Image optimization — WebP/AVIF, responsive
srcset, lazy loading - Minify CSS/JS — in the build (Next.js, Vite, and Webpack do it automatically)
- Code splitting — dynamic imports for below-the-fold content
- Font optimization —
font-display: swap, preconnect, subsetting - Critical CSS — inline above-the-fold styles
- Defer non-critical JS —
<script defer>/<script async> - CDN — serving files from servers close to the user
- HTTP/2 + brotli — server configuration
- Cache headers — long
max-ageandimmutablefor static files - Fewer third-party scripts — limit trackers, lazy-load analytics
Common mistakes
- Score chasing — the gap between 95 and 100 is the result of one lab test, not the experience of your users
- Lab vs field disconnect — Lighthouse shows a good score but field data doesn't: the optimization isn't reaching real users
- Single page audit — people usually test the homepage, but each template can have different problems
- No monitoring — a one-time audit instead of regularly checking field data
Related terms
- Core Web Vitals — user experience metrics
- SEO — Lighthouse SEO category
- Technical SEO — context
- PageSpeed — page speed and PageSpeed Insights