DEV.co
Open-Source Testing · chromedp

chromedp

chromedp is a Go library that controls headless Chrome browsers via the Chrome DevTools Protocol without requiring external dependencies. It simplifies browser automation for testing, screenshot generation, and web scraping tasks.

Source: GitHub — github.com/chromedp/chromedp
13.2k
GitHub stars
881
Forks
Go
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorychromedp/chromedp
Ownerchromedp
Primary languageGo
LicenseMIT — OSI-approved
Stars13.2k
Forks881
Open issues176
Latest releasev0.15.1 (2026-04-01)
Last updated2026-03-23
Sourcehttps://github.com/chromedp/chromedp

What chromedp is

chromedp provides a Go API for driving Chrome/Chromium via CDP, offering context-based action composition, built-in headless execution, and connection pooling. It generates protocol bindings from Chrome's protocol definition and supports both embedded and remote browser instances.

Quickstart

Get the chromedp source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/chromedp/chromedp.gitcd chromedp# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Headless Testing & Automation

Browser-based testing, end-to-end test automation, and automated screenshot/PDF generation in CI/CD pipelines using Go test suites.

Web Scraping & Data Collection

JavaScript-heavy site scraping, dynamic content extraction, and automated form submission where a full browser instance is required.

Go-Native DevTools Integration

Embedding browser control directly in Go services without spawning separate processes or managing language barriers, simplifying deployment.

Implementation considerations

  • Chrome/Chromium binary must be present on the system or use the `chromedp/headless-shell` Docker image for Linux environments.
  • Context and cancellation are central to the API; improper context handling can result in leaked browser processes or 'invalid context' errors.
  • Blocking calls to `chromedp.Run()` should be managed carefully in concurrent applications to avoid goroutine starvation.
  • Memory footprint per browser instance is substantial (hundreds of MB); batch operations or connection pooling is essential for multi-instance workloads.
  • CDP protocol version must match the Chrome version in use; version skew can cause unexpected failures.

When to avoid it — and what to weigh

  • Non-Go Ecosystems — If your team primarily uses Python, Node.js, or Java, language-native alternatives (Selenium, Puppeteer, Playwright) may have better ecosystem support and documentation.
  • High-Volume Concurrent Sessions — Scaling to thousands of parallel browser instances requires careful resource management; consider dedicated browser farms or managed services for production scale.
  • Interactive GUI Browser Testing — If you need visual regression testing, cross-browser compatibility matrices, or screenshot comparisons, specialized visual testing tools are better suited.
  • Minimal Overhead Required — chromedp spawns a full Chrome process; for lightweight HTTP-only scraping or testing, a simpler HTTP client library is more efficient.

License & commercial use

MIT License. Permissive, OSI-approved license allowing free use, modification, and distribution in both open-source and proprietary projects with attribution.

MIT license explicitly permits commercial use without license restrictions. Verify compliance with any bundled dependencies (chromedp has no external Go dependencies), and ensure your deployment of Chrome/Chromium complies with its terms. No commercial support model evident in repository data.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

chromedp drives a full Chrome instance; untrusted websites or malicious JavaScript can potentially execute arbitrary code or escape the browser context. Isolate browser instances in sandboxed containers for untrusted content. No security audits or vulnerability disclosure process evident in repository data. Validate all input to browser actions and monitor process resource limits to prevent denial-of-service.

Alternatives to consider

Selenium WebDriver (Go bindings)

Industry-standard for cross-browser testing; larger ecosystem and community, but heavier setup and slower than chromedp. Better for multi-browser QA.

Puppeteer (Node.js) or Playwright (Node.js/Python/Go)

Similar feature set and performance; Playwright offers broader language support and visual comparison features. chromedp is lighter if Go-only is acceptable.

Native Chrome DevTools Protocol libraries (C++, Java)

Lower-level control and performance; substantially more complex API and deployment overhead. Use only if chromedp's abstraction is insufficient.

Software development agency

Build on chromedp with DEV.co software developers

chromedp simplifies Chrome automation for Go teams. Evaluate it for your testing, scraping, or CI/CD workflow.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

chromedp FAQ

Can I use chromedp without installing Chrome?
No, a Chrome/Chromium binary is required at runtime. Use the `chromedp/headless-shell` Docker image or install Chrome locally. You can also connect to a remote Chrome instance via `RemoteAllocator`.
What happens to Chrome processes when my Go program exits?
On Linux, chromedp force-kills child Chrome processes to prevent resource leaks. On other OSes, behavior may vary. Explicitly cancel contexts to ensure clean shutdown; use `RemoteAllocator` for long-running instances.
How do I run chromedp in production?
Deploy as a containerized service with the `chromedp/headless-shell` image, manage concurrency with goroutine pools, monitor memory usage, and consider a dedicated browser farm for high-volume workloads.
Is chromedp thread-safe?
chromedp uses Go contexts and channels for concurrency; a single chromedp context/connection is not thread-safe. Create separate contexts for concurrent requests or use connection pooling patterns.

Work with a software development agency

From first prototype to production, DEV.co delivers software development services around tools like chromedp. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source testing and beyond.

Ready to automate browser tasks in Go?

chromedp simplifies Chrome automation for Go teams. Evaluate it for your testing, scraping, or CI/CD workflow.