lightpanda-browser

Overview

Lightpanda is an open-source headless browser built from scratch for performance. Unlike tools that wrap Chromium, Lightpanda is written in Zig and designed specifically for headless workloads: web automation, scraping, testing, and AI agent workflows.

Why Lightpanda?

Modern web pages rely heavily on JavaScript – Ajax calls, single-page applications, dynamic rendering. Simple HTTP requests can no longer extract useful content from most sites. The usual answer is to run a full desktop browser like Chrome in headless mode, but that approach is expensive: Chrome instances consume significant memory and CPU, making large-scale deployments costly and difficult to maintain.

Lightpanda takes a different approach. It is not based on Chromium, Blink, or WebKit. It is a purpose-built headless browser with no graphical rendering layer, optimized for speed and low resource usage.

Key Features

Lightpanda supports the core capabilities needed for headless browser automation:

Performance

Lightpanda delivers substantial performance improvements over Chrome in headless scenarios:

Metric Lightpanda vs Chrome
Execution time 11x faster
Memory usage 9x less
Startup Instant

These benchmarks were measured using Puppeteer to request 100 pages from a local website on an AWS EC2 m5.large instance. See the benchmark repository for full details.

How It Works

Lightpanda runs as a CDP (Chrome DevTools Protocol) server. You start the server, then connect your existing automation tools – Puppeteer, Playwright, or chromedp – by pointing them at the Lightpanda endpoint instead of Chrome.

# Start the CDP server
./lightpanda serve --host 127.0.0.1 --port 9222
// Connect with Puppeteer
import puppeteer from 'puppeteer-core';
const browser = await puppeteer.connect({
  browserWSEndpoint: "ws://127.0.0.1:9222",
});

You can also use Lightpanda to fetch and dump a page directly from the command line:

./lightpanda fetch https://example.com

For detailed setup instructions, see Quick Start.

Architecture

Lightpanda is composed of several core subsystems:

The system is written in Zig, a low-level language chosen for its fine-grained memory control and predictable performance characteristics.

For a deeper look at each component, see Architecture.

Current Status

Lightpanda is in Beta. Core functionality is working and many websites render correctly, but you may encounter errors or missing Web API coverage. The team is actively expanding support.

Implemented features include:

There are hundreds of Web APIs, and coverage will continue to increase over time. You can track JavaScript support progress in the zig-js-runtime project.

Telemetry

By default, Lightpanda collects and sends usage telemetry. You can disable this by setting the environment variable:

export LIGHTPANDA_DISABLE_TELEMETRY=true

Read the full privacy policy at lightpanda.io/privacy-policy.

Getting Started

Topic Description
Quick Start Installation, basic usage, and first steps
Architecture Technical design and component overview
Building from Source Prerequisites, build instructions, and development setup
Testing Unit tests, end-to-end tests, and Web Platform Tests
Contributing CLA, pull requests, and contribution guidelines