.NET 9 & .NET 10 · HTML · XML · RSS · Sitemaps

Scrape HTML 10–33x faster in .NET

z3l.FastHtmlParser is a low-allocation HTML/XML parser built for scraping and data extraction. Same results as AngleSharp and HtmlAgilityPack, with a fraction of the CPU time and memory.

> dotnet add package z3l.FastHtmlParser
10–33xfaster parsing
13–23xless memory
0allocations to match tags
60 μsto parse a 50 KB page

Scraping code that reads like the page

No CSS selector strings to parse, no XPath. Typed tags and attributes, and chains that never throw.

  • 1
    Typed and allocation-freeAbout 250 tags and 250 attributes as enums: HTML, SVG, MathML, RSS, Atom, sitemaps.
  • 2
    Null-safe chainsA missing element gives null at the end of the chain, not an exception.
  • 3
    Absolute linksAttributeHref() resolves links against the page URL for you.
using z3l.FastHtmlParser;

var doc = new HtmlParser(html, "https://example.com/catalog/");

// first match
var title = doc.Find(HtmlTag.H1).Text();
var price = doc.Find(HtmlTag.Span, cls: "price").Text();

// chains never throw: a missing tag gives null
var phone = doc.Find(HtmlTag.Div, id: "contacts")
               .Find(HtmlTag.A, cls: "phone")
               .AttributeHrefTelephone();

// all matches, links made absolute
foreach (var a in doc.Find(HtmlTag.Div, cls: "gallery")
                     .FindAll(HtmlTag.A))
{
    Console.WriteLine(a.AttributeHref());
}

Benchmarks on real pages

BenchmarkDotNet, .NET 10, Intel Xeon E-2236. Shorter is better. In the scraping tasks all three libraries return exactly the same records.

Time

Memory allocated

AngleSharp 1.10.0, HtmlAgilityPack 1.13.1. Full tables, method and source: benchmarks on GitHub.

Everything scraping needs, nothing it doesn't

Fewer CPU cores per crawler, less GC pressure, lower cloud bills.

Fast parsing

One pass, one exact-size list of tags. A 50 KB page parses in about 60 μs.

Zero-allocation matching

Find, FindAll and Is compare spans and enums: searching allocates nothing.

Clean text

Text() gives visible text; TextLineBreaks() keeps lines and paragraphs.

HTML5 entities

All 2125 named references, legacy names without ; and numeric references, decoded like a browser.

XML, RSS, Atom, sitemaps

Documents starting with <?xml are parsed by XML rules, so feeds and sitemaps just work.

Thread-safe, AOT-ready

A parsed document is read-only: query it from any number of threads. Trimming and Native AOT compatible.

What it is not. It builds a flat list of tags, not a full DOM: no CSS selectors or XPath, no implicit <tbody>, read-only documents. For extracting data it finds the same elements, texts and attributes as AngleSharp; the test suite checks this on every saved page.

Simple, one-time pricing

Free for individuals and small companies. Larger organizations pay once and use it forever.

Community

Individuals and organizations under USD 1M annual revenue and under 100 employees.

$0 free forever
  • Commercial use included
  • All features, no limits
  • All future versions
  • Community support on GitHub
Install from NuGet

No registration, no license key.

Questions

Do I need a commercial license?

Only if your organization, together with its affiliates, has USD 1,000,000 or more in annual revenue, or 100 or more employees and contractors. Everyone else uses it free, including in commercial products.

What exactly do I get for $1,000?

A perpetual license for your whole organization: any number of developers, applications, servers and deployments, all current and future versions, an invoice, a license certificate and priority email support.

Can we pay by invoice or bank transfer?

Yes. Card checkout is the fastest; for an invoice, purchase order or vendor onboarding, write to romanti3172@gmail.com.

Do our customers need a license too?

No. End users of your applications and services never need their own license.

Does the library phone home or check a license key?

No. There is no license key, no telemetry and no network access. Licensing is a legal agreement, not a technical lock.

What if we grow past the threshold later?

Keep using it and buy the commercial license within 30 days of crossing the threshold.

Can I get a refund?

Yes, within 14 days of purchase, no questions asked. See the refund policy.

Try it on your own pages

Install the package, run your scraper and compare the numbers. It is free to evaluate for everyone.

> dotnet add package z3l.FastHtmlParser