Latest release: AngleSharp 1.10.5

Parse the web.
The .NET way.

AngleSharp is the standards-driven engine for HTML5, CSS, SVG, MathML, and XML in .NET. Parse, query, style, script, and render documents — exactly like a browser would.

$ dotnet add package AngleSharp
using AngleSharp;

var context = BrowsingContext.New(Configuration.Default);
var document = await context.OpenAsync(req => req
    .Content("<ul><li>One<li>Two</ul><p>Unclosed <b>tags"));

// Same error recovery as every modern browser
Console.WriteLine(document.Body!.InnerHtml);
OutputAngleSharp
<ul><li>One</li><li>Two</li></ul><p>Unclosed <b>tags</b></p>
603M+NuGet downloads
10ecosystem packages
0core dependencies
13+years in production
Why AngleSharp

A browser engine core, as a library.

Everything you need to work with web content from C#, F#, or PowerShell — on any platform that runs .NET.

Standards-driven

Built from the WHATWG and W3C specifications. Malformed HTML is handled exactly like in evergreen browsers.

Fast by design

Streaming tokenizer, minimal allocations, and modern TFMs. Parse large documents in milliseconds.

The real DOM

The API you know from the browser: querySelector, events, mutation, serialization — fully interactive.

Selectors & LINQ

Powerful CSS selectors, XPath via AngleSharp.XPath, and LINQ on top of every node collection.

Modular ecosystem

A small, dependency-free core. Add CSS, JavaScript, XML, IO, or rendering only when you need it.

Extensible everywhere

Bring your own requester, cookie container, script engine, or service. Everything is configurable.

Modern HTML

template, picture, popovers, shadow DOM, custom elements — AngleSharp keeps up.

Forms & navigation

Fill, validate, and submit forms. Navigate between pages with a full browsing context.

Built in the open. Powered by people.

AngleSharp is MIT licensed and maintained by volunteers. Contributions, issues, and sponsorships keep it moving.