Lighthouse: Automated web performance auditing tool
Open-source tool that analyzes web pages for performance, accessibility, and SEO, generating actionable reports.
Learn more about Lighthouse
Lighthouse is a web auditing tool developed by Google that runs automated tests against web pages to assess performance, accessibility, progressive web app features, SEO, and best practices. It operates by controlling a headless Chrome browser instance, collecting runtime data through the Chrome DevTools Protocol, and analyzing page behavior during load and interaction phases. The tool generates detailed reports with performance scores, diagnostic information, and specific recommendations for optimization. Lighthouse can be executed through Chrome DevTools, as a Node.js CLI tool, browser extension, or integrated into CI/CD pipelines for continuous monitoring.
Multiple Integration Options
Available as Chrome DevTools integration, Node.js CLI, browser extension, and programmatic API. Supports both interactive analysis and automated testing workflows.
Comprehensive Audit Categories
Evaluates performance metrics, accessibility compliance, PWA features, SEO factors, and development best practices in a single analysis. Provides scored results with specific improvement recommendations.
Chrome DevTools Protocol
Leverages Chrome's debugging protocol to collect real browser performance data including network timing, JavaScript execution, and rendering metrics. Supports custom audit development and configuration.
const lighthouse = require('lighthouse');
const chromeLauncher = require('chrome-launcher');
async function runLighthouseAudit() {
// Launch Chrome instance
const chrome = await chromeLauncher.launch({chromeFlags: ['--headless']});
const options = {
logLevel: 'info',
output: 'html',
onlyCategories: ['performance'],
port: chrome.port,
};
// Run Lighthouse audit
const runnerResult = await lighthouse('https://example.com', options);
// Extract scores and metrics
const reportHtml = runnerResult.report;
const score = runnerResult.lhr.categories.performance.score * 100;
console.log(`Performance score: ${score}`);
console.log(`First Contentful Paint: ${runnerResult.lhr.audits['first-contentful-paint'].displayValue}`);
await chrome.kill();
return runnerResult;
}
runLighthouseAudit().catch(console.error);Fixed incorrect DPR used for responsive images advice.
- –fix incorrect dpr used for responsive images advice
Removed several performance audits that have been replaced by performance insights.
- –performance: remove audits replaced by performance insights
- –remove preload-fonts, uses-rel-preload audits
- –remove font-size audit
Improved error handling and insights display with fixes for large errors and animation detection.
- –errors-in-console: truncate large errors
- –insights: passing score (not n/a) for empty results
- –non-composited-animations: separate custom CSS properties
See how people are using Lighthouse
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
yay
Go-based AUR helper for Arch Linux that manages packages with dependency resolution and PKGBUILD support.
Biome
Unified toolchain providing fast formatting and linting for JavaScript, TypeScript, CSS, and JSON with CLI and LSP.
pybind11
Header-only library creating minimal-boilerplate C++ Python bindings.
Build Your Own X
Curated guides for recreating popular technologies from scratch, from 3D renderers to operating systems.
ExcelJS
Parse, modify, and generate XLSX files in Node.js.