puppeteer-sharp
Puppeteer Sharp is a .NET library that automates Chrome and Chromium browsers, enabling headless operations like screenshots, PDF generation, and web scraping. It brings the popular Node.js Puppeteer API to C# developers with support for modern .NET versions and AOT compilation.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | hardkoded/puppeteer-sharp |
| Owner | hardkoded |
| Primary language | C# |
| License | MIT — OSI-approved |
| Stars | 3.9k |
| Forks | 485 |
| Open issues | 9 |
| Latest release | v25.3.1 (2026-07-03) |
| Last updated | 2026-07-03 |
| Source | https://github.com/hardkoded/puppeteer-sharp |
What puppeteer-sharp is
A Chrome DevTools Protocol (CDP) client for .NET Standard 2.0+ and .NET 8, providing async/await-based browser automation with cross-platform support. Offers multiple NuGet packages (full, CDP-only for AOT, and ASP.NET Framework variant) with WebDriver BiDi and Firefox support introduced in recent versions.
Get the puppeteer-sharp source
Clone the repository and explore it locally.
git clone https://github.com/hardkoded/puppeteer-sharp.gitcd puppeteer-sharp# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Browser binary management: Use BrowserFetcher to download compatible Chrome/Chromium versions automatically or manage binaries externally in containerized deployments.
- Async/await patterns required: API is fully async; integration into sync code requires ConfigureAwait(false) and careful task orchestration.
- Resource lifecycle: Always use `await using` for browser and page objects to ensure proper cleanup and avoid memory leaks in long-running services.
- Viewport and navigation timing: Set viewport before navigation and use appropriate WaitUntilNavigation strategies (Networkidle0, Networkidle2, DOMContentLoaded) for reliable rendering.
- Remote browser connection: Supports WSS endpoints for remote browser instances, enabling distributed testing and cloud-based browser farms.
When to avoid it — and what to weigh
- Windows-Only or Limited Infrastructure — Requires X-server on Linux and full Chrome/Chromium binary downloads. Not suitable for minimal resource environments or platforms where headless browser operation is restricted.
- High-Volume Concurrent Browser Sessions at Scale — Each browser instance consumes significant memory and CPU. Requires careful resource pooling and orchestration; not optimized for thousands of simultaneous headless sessions.
- Lightweight, Embedded Rendering Tasks — Overkill for simple HTML-to-image or lightweight parsing jobs. Consider lighter alternatives if full browser automation and JavaScript execution are not needed.
- Legacy .NET Framework Projects Without AOT — While NetStandard 2.0 support exists, AOT compilation support is limited to .NET 8+. Full-featured support may require .NET Framework 4.6.1+ migration or significant adaptation.
License & commercial use
MIT License. Permissive OSI-compliant license allowing unrestricted use, modification, and distribution in proprietary and open-source projects.
MIT license permits commercial use without attribution requirement or restriction. No licensing fees, vendor lock-in, or usage limits. Review dependency licenses (Chrome/Chromium) for your distribution model; Chromium is open-source but subject to its own license terms.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
No published security audit or formal security policy mentioned in data. Consider: browser automation exposes the underlying Chromium process to JavaScript execution from visited pages; isolate browser instances if processing untrusted content. Use WSS (WebSocket Secure) for remote browser connections. No claims made about sandboxing strength; assume Chromium's native sandbox model applies.
Alternatives to consider
Selenium WebDriver (.NET)
Mature, multi-browser support (IE, Firefox, Safari). Heavier and synchronous by default; less developer-friendly but more battle-tested in enterprise test suites.
Playwright for .NET
Microsoft-backed, cross-browser (Chrome, Firefox, WebKit), modern async API similar to Puppeteer Sharp. Actively maintained; good documentation. Consider if standardizing on Playwright ecosystem.
HtmlAgilityPack + AngleSharp
Lightweight HTML parsing without browser automation. Suitable for static or simple DOM extraction; no JavaScript execution, much lower overhead.
Build on puppeteer-sharp with DEV.co software developers
Puppeteer Sharp powers headless testing, PDF generation, and web scraping in C#. Evaluate its fit for your infrastructure, resource constraints, and integration with your CI/CD pipeline. Devco can help architect and deploy scalable automation solutions.
Talk to DEV.coRelated 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.
puppeteer-sharp FAQ
Does Puppeteer Sharp work with Firefox?
Can I use Puppeteer Sharp in serverless/FaaS (AWS Lambda, Azure Functions)?
How do I manage multiple concurrent browsers without memory exhaustion?
Is Puppeteer Sharp suitable for production PDF generation at scale?
Custom software development services
DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If puppeteer-sharp is part of your open-source testing roadmap, our team can implement, customize, migrate, and maintain it.
Need Production Browser Automation for Your .NET Stack?
Puppeteer Sharp powers headless testing, PDF generation, and web scraping in C#. Evaluate its fit for your infrastructure, resource constraints, and integration with your CI/CD pipeline. Devco can help architect and deploy scalable automation solutions.