Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

AngleSharp – A .NET HTML Parser That Became a Foundation for Many Projects

Description and use

AngleSharp is a .NET library that provides a standards‑conformant parser for HTML, CSS, SVG, and XML. Originating as a side project written on a plane, it evolved into a foundational component for many applications such as HtmlSanitizer, bUnit, and PreMailer.Net, achieving over 500 million installs.

Problem

Developers needed a standards‑conformant HTML/CSS/JS parser in .NET that could be used for scraping, testing, sanitizing, and rendering without a browser.

Outcome

AngleSharp grew from a side‑project written on a plane to a widely adopted .NET foundation library with over 500 million installs, powering HTML sanitization, Blazor testing, email rendering, and many commercial applications.

Workflow

  • 1. Install AngleSharp via NuGet.
  • 2. Create an HtmlParser or BrowsingContext.
  • 3. Parse markup or load documents from the network.
  • 4. Query the DOM with standard selectors.
  • 5. Extend functionality with satellite packages (Css, Js, Xml, Diffing).

Evidence

AngleSharp is a .NET library that parses HTML, SVG, MathML, CSS, and (to a good extent) XML, and gives you back a fully-featured, spec-conformant DOM.

Source

The core package alone sits at over 310 million downloads, with satellite packages bringing the total above 500 million installs.

Source

HtmlSanitizer uses AngleSharp to parse and re‑render HTML while stripping out anything that could be used for cross‑site scripting.

Source

  • Record date: 2026-09-21T11:00:33.520Z