Google Lighthouse: How to Run It and Read Scores

Farouk Ben. - Founder at OdownFarouk Ben.()
Google Lighthouse: How to Run It and Read Scores - Odown - uptime monitoring and status page

Google Lighthouse is a free, open-source tool from Google that audits a web page and scores it from 0 to 100 in four categories: Performance, Accessibility, Best Practices and SEO. The fastest way to run it is in Chrome: open DevTools (F12), choose the Lighthouse tab and click Analyze page load.

This guide explains every way to run Lighthouse, what each category checks, how the performance score is calculated, why scores vary between runs and how to fix the most common issues.

Table of Contents

  1. What is Google Lighthouse?
  2. Why Lighthouse Matters for Developers
  3. How to Run Lighthouse
  4. Understanding Lighthouse Metrics
  5. Performance Score Explained
  6. Common Issues and How to Fix Them
  7. Lighthouse Score Variability
  8. Sharing and Viewing Reports
  9. Extending Lighthouse
  10. Using Lighthouse with Continuous Integration
  11. Lighthouse and Uptime Monitoring
  12. Conclusion

What is Google Lighthouse?

Google Lighthouse is an open-source, automated tool designed to improve the quality of web pages. Developed by Google, it audits web pages across four categories: performance, accessibility, best practices and SEO. (Older versions also had a Progressive Web App category; it was removed in Lighthouse 12 in 2024.)

The beauty of Lighthouse is its versatility—it works on any web page, whether it's publicly accessible or behind authentication. It runs a series of audits on your page, generates a report on how well it performed, and provides actionable recommendations for improvements.

Lighthouse started out measuring mainly performance and has grown into a broader quality audit covering accessibility, best practices and SEO as well.

Why Lighthouse Matters for Developers

In my experience, there are several compelling reasons why Lighthouse should be part of your development workflow:

  1. User Experience Optimization - Lighthouse metrics directly correlate with user experience factors. Faster loading times and responsive interactions lead to happier users.

  2. SEO Improvements - Google uses page experience signals (including loading performance) as ranking factors. Better Lighthouse scores often translate to better search visibility.

  3. Accessibility Compliance - The accessibility audits help ensure your site works for everyone, including users with disabilities.

  4. Performance Benchmarking - Lighthouse provides objective metrics to track improvements over time or to compare against competitors.

  5. Best Practice Enforcement - The tool encourages following web development best practices that might otherwise be overlooked.

The difference between a site with poor Lighthouse scores and one with excellent scores is dramatic. I've seen conversion rates jump by 20% or more after implementing Lighthouse-recommended improvements.

How to Run Lighthouse

One thing I love about Lighthouse is how accessible it is. You can run it in several different ways depending on your preference and needs.

Chrome DevTools Method

This is the most straightforward way to run Lighthouse:

  1. Open Chrome and navigate to the page you want to audit
  2. Press F12 or right-click anywhere on the page and select "Inspect"
  3. Click on the "Lighthouse" tab in DevTools
  4. Select the categories you want to audit
  5. Click "Analyze page load"

After 30-60 seconds (depending on your connection and the page complexity), you'll see a detailed report right in your browser.

I prefer this method for quick checks during development because it doesn't require any additional tools or setup.

Command Line Interface

For those who like working in the terminal or want to automate Lighthouse runs:

  1. Install Node.js if you haven't already
  2. Install Lighthouse globally:
npm install -g lighthouse
  1. Run the command:
lighthouse <url>

You can customize the command with various flags. To see all options, run:

lighthouse --help

This method is perfect for integration into CI/CD pipelines or batch testing multiple URLs.

Node.js Module

Lighthouse can also be used programmatically as a Node.js module. This is ideal for integrating Lighthouse into your own tools or scripts:

  1. Install Lighthouse in your project:
npm install lighthouse
  1. Import and use it in your code:
const lighthouse = require('lighthouse');
const chromeLauncher = require('chrome-launcher');

async function runLighthouse(url) {
const chrome = await chromeLauncher.launch();
const options = { port: chrome.port };
const results = await lighthouse(url, options);
await chrome.kill();
return results;
}

I've used this approach to build custom reporting systems that track performance metrics across dozens of pages and alert teams when specific metrics decline.

PageSpeed Insights

If you prefer not to install anything:

  1. Visit PageSpeed Insights
  2. Enter the URL you want to analyze
  3. Click "Analyze"

The results include Lighthouse metrics along with additional field data from the Chrome User Experience Report.

Chrome Extension

Google also offers a Lighthouse Chrome extension:

  1. Install the Lighthouse Chrome Extension
  2. Click the Lighthouse icon in your browser toolbar
  3. Click "Generate report"

This creates a new tab with your report. The extension is handy if you frequently run Lighthouse on many different sites.

Understanding Lighthouse Metrics

Lighthouse evaluates pages across four categories, each containing multiple audits. Let's break them down:

Performance

This category measures how quickly users can see and interact with page content. It includes metrics like:

  • First Contentful Paint (FCP) - When the browser renders the first bit of content
  • Speed Index - How quickly content is visibly populated
  • Largest Contentful Paint (LCP) - When the largest content element becomes visible
  • Time to Interactive (TTI) - When the page becomes fully interactive
  • Total Blocking Time (TBT) - Total time when the main thread was blocked
  • Cumulative Layout Shift (CLS) - Measures visual stability

Accessibility

These audits check if your page is usable by everyone, including people with disabilities. They cover areas like:

  • Proper use of ARIA attributes
  • Color contrast
  • Form labels
  • Keyboard navigation
  • Alt text for images

Best Practices

This section evaluates adherence to web development best practices, including:

  • HTTPS usage
  • Correct aspect ratios for images
  • Avoiding deprecated APIs
  • Secure connections
  • Proper error handling

SEO

Search Engine Optimization audits check if your page is optimized for search engine results:

  • Mobile-friendly design
  • Meta descriptions
  • Crawlable links
  • Proper font sizes
  • Structured data

Progressive Web App (removed)

Lighthouse 12, released in 2024, removed the Progressive Web App category. To check whether a site is installable (a web app manifest, a service worker and HTTPS), use the Application panel in Chrome DevTools instead.

Performance Score Explained

The performance score is arguably the most scrutinized aspect of Lighthouse. Let's dive into how it works.

How Performance Scores are Calculated

Lighthouse collects performance metrics during page load, then converts each raw metric value into a score from 0 to 100. This conversion is based on real-world performance data from HTTP Archive.

The scoring curve uses a log-normal distribution, which means improvements to already-fast pages are weighted more heavily than similar improvements to slow pages. This makes sense—shaving 100ms off a 1-second load time is more impressive than shaving the same 100ms off a 10-second load time.

Between scores of 50 and 92, there's a nearly linear relationship between metric improvement and score improvement. Around 96, you hit a point of diminishing returns where it takes increasingly more effort to gain small score improvements.

Metric Weightings

Not all performance metrics are created equal. Since Lighthouse 10, the weightings are:

Metric Weight
First Contentful Paint 10%
Speed Index 10%
Largest Contentful Paint 25%
Total Blocking Time 30%
Cumulative Layout Shift 25%

These weightings have changed over time. For example, in Lighthouse 8, Time to Interactive had a 10% weight but has since been removed from the scoring calculation.

Total Blocking Time and Largest Contentful Paint together account for 55% of the score, so improving them usually moves the score the most.

Color-Coding System

Lighthouse uses a traffic light color system to make scores easier to interpret:

  • 0-49: Red (Poor)
  • 50-89: Orange (Needs Improvement)
  • 90-100: Green (Good)

Aiming for green scores (90+) is ideal, but perfection isn't required. In fact, a perfect 100 score is extremely difficult to achieve and maintain, especially on complex pages. Even Google's own pages rarely achieve perfect scores across all categories.

Common Issues and How to Fix Them

Over the years, I've encountered certain Lighthouse issues repeatedly. Here are some of the most common problems and their solutions:

  1. Render-blocking resources

    • Solution: Use async/defer for non-critical JavaScript and preload critical resources
  2. Properly sized images

    • Solution: Serve appropriately sized images for each device and use modern formats like WebP
  3. Unused JavaScript/CSS

    • Solution: Implement code splitting and remove unused code
  4. Excessive DOM size

    • Solution: Reduce the number of DOM elements, especially deeply nested ones
  5. Missing meta tags

    • Solution: Ensure proper meta description, viewport settings, and title tags
  6. Insufficient color contrast

    • Solution: Adjust text and background colors to meet WCAG guidelines
  7. Missing alt attributes

    • Solution: Add descriptive alt text to all images
  8. Layout shifts

    • Solution: Specify image dimensions, precompute layout space for dynamic content

Lighthouse Score Variability

One frustrating aspect of Lighthouse is score fluctuation. You might run the same test twice and get different results. This isn't a bug—it's the nature of web performance testing.

Common causes of variability include:

  • Network conditions (even slight fluctuations can impact metrics)
  • CPU throttling differences
  • Extensions running in the browser
  • Background processes on your device
  • A/B tests or randomly served ads on the page
  • Server-side performance fluctuations

When I'm evaluating Lighthouse scores, I typically run at least three tests and take the median score. For more accuracy, consider using Lighthouse CI (more on that later) which can run multiple samples automatically.

Rather than fixating on a single number, it's better to think of your performance as a distribution of scores. A page that scores between 85-92 across multiple runs is probably more consistent than one that wildly swings between 70-100.

Sharing and Viewing Reports

After running Lighthouse, you might want to share the results with team members or clients. Lighthouse offers several ways to do this:

  1. Save as JSON - From the report, click the menu button (three dots) and select "Save as JSON"

  2. Save as HTML - Similarly, you can save the full report as an HTML file

  3. Lighthouse Viewer - Upload JSON reports to the Lighthouse Viewer to view them online

  4. GitHub Gists - From the Viewer, you can save reports as GitHub gists for sharing

  5. Screenshot - For quick sharing, a screenshot of the summary section works well

I often use GitHub gists when collaborating with remote teams because they provide version control and easy linking. Just be careful with sensitive data if you're testing pages behind authentication.

Extending Lighthouse

One of Lighthouse's strengths is its extensibility. Two key features allow you to customize Lighthouse for specific needs:

Stack Packs

Stack packs allow Lighthouse to detect what platform your site is built on and provide targeted recommendations. For example, if you're using WordPress, Lighthouse can suggest WordPress-specific optimizations.

Currently supported stack packs include:

  • WordPress
  • React
  • Angular
  • Magento
  • AMP

This feature makes recommendations more actionable because they account for the constraints and best practices of your specific technology stack.

Lighthouse Plugins

For more customization, Lighthouse supports plugins that add new audits to your reports. These plugins are Node.js modules that implement custom checks.

Some popular plugins include:

  • lighthouse-plugin-publisher-ads
  • lighthouse-plugin-field-performance
  • lighthouse-plugin-crux

You can also create your own plugins. This is particularly useful for organizations with specific requirements or custom frameworks.

Using Lighthouse with Continuous Integration

Integrating Lighthouse into your CI/CD pipeline helps catch performance regressions before they reach production. Lighthouse CI is a set of tools that make this process easier.

To get started:

  1. Install Lighthouse CI:
npm install -g @lhci/cli
  1. Initialize it in your project:
lhci init
  1. Add a configuration file (lighthouserc.js):
module.exports = {
ci: {
collect: {
startServerCommand: 'npm run start',
url: ['http://localhost:4000/'],
},
assert: {
assertions: {
'categories:performance': ['error', {minScore: 0.8}],
'cumulative-layout-shift': ['warning', {maxNumericValue: 0.1}],
},
},
upload: {
target: 'temporary-public-storage',
},
}
};
  1. Run it in your CI pipeline:

lhci autorun

This configuration will start your development server, run Lighthouse against it, assert that the performance score is at least 80, warn if CLS exceeds 0.1, and upload results to temporary storage.

I've set up systems where pull requests get automatically flagged if they cause significant Lighthouse score decreases. This prevents performance degradation from sneaking into production.

Lighthouse and Uptime Monitoring

Lighthouse tells you how well a page performs in a single test. It doesn't tell you whether the page is up right now, or whether it slowed down at 3 a.m. last night. For that you need continuous monitoring alongside it.

Odown checks your pages every minute from 17 regions, records response times and alerts you by email, SMS, Slack and other channels when a site goes down or an SSL certificate is about to expire. Use Lighthouse during development and in CI, and uptime monitoring in production. Odown doesn't run Lighthouse audits itself; for those, see the CI setup above or PageSpeed Insights.

Conclusion

Google Lighthouse has transformed how developers approach web performance and quality. By providing objective metrics and actionable recommendations across performance, accessibility, best practices and SEO, it helps create better web experiences for everyone.

The tool's flexibility—available in DevTools, CLI, as a Node module, or through services like PageSpeed Insights—makes it accessible regardless of your workflow preferences. Its scoring system, while sometimes frustrating in its variability, provides a standardized way to measure improvements over time.

Lighthouse covers how well your pages perform when you test them; uptime and SSL monitoring cover whether they stay available in between.

Remember that Lighthouse scores aren't the end goal—they're a means to creating faster, more accessible, and more user-friendly websites. The real measure of success is improved user experiences, higher engagement, and better business outcomes.

So fire up Lighthouse, start testing your pages, and use those insights to build a better web!