HtmlTinkerX 2.2.0

dotnet add package HtmlTinkerX --version 2.2.0
                    
NuGet\Install-Package HtmlTinkerX -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HtmlTinkerX" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HtmlTinkerX" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="HtmlTinkerX" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HtmlTinkerX --version 2.2.0
                    
#r "nuget: HtmlTinkerX, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HtmlTinkerX@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HtmlTinkerX&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=HtmlTinkerX&version=2.2.0
                    
Install as a Cake Tool

HtmlTinkerX

HtmlTinkerX is a .NET library for parsing and inspecting HTML, CSS, and JavaScript. It includes static extraction, website crawling, audit-oriented page analysis, email CSS inlining, and Playwright browser automation. PowerShell users can access the same engine through the PSParseHTML module.

Install

dotnet add package HtmlTinkerX

Pin a stable HtmlTinkerX version when reproducible restores matter.

Parse HTML

using AngleSharp.Dom;
using HtmlTinkerX;

IDocument document = HtmlParser.ParseWithAngleSharp("""
    <article>
      <h1>Service status</h1>
      <a href="/incidents/42">Current incident</a>
    </article>
    """);

string title = document.QuerySelector("h1")?.TextContent ?? string.Empty;

Audit generated or supplied HTML

HtmlDocumentAudit provides one reusable contract for static output checks. It reports duplicate IDs, missing document metadata, image alternatives, control names and labels, unsafe URL schemes, and heading-order problems.

HtmlDocumentAuditResult audit = HtmlDocumentAudit.Analyze(html);

foreach (HtmlDocumentAuditIssue issue in audit.Issues) {
    Console.WriteLine($"{issue.Severity}: {issue.Code} - {issue.Message}");
}

The audit is diagnostic; it does not rewrite the document or claim full WCAG conformance.

For client-rendered pages, run the same contract after navigation:

await using HtmlBrowserSession session = await HtmlBrowser.OpenSessionAsync(url);
HtmlDocumentAuditResult renderedAudit = await HtmlBrowser.AuditDocumentAsync(session);

Rendered UI tests can inspect styles and attributes without creating another Playwright wrapper:

IReadOnlyDictionary<string, string> values = await HtmlBrowser.GetComputedStylesAsync(
    session,
    ".report-panel",
    new[] { "position", "padding", "overflow" });

string? label = await HtmlBrowser.GetAttributeAsync(session, "#export", "aria-label");

URL parsers stream responses with a 16 MiB default limit and cooperative cancellation. Override the bound for a specific operation when needed:

using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var document = await HtmlParser.ParseUrlWithAngleSharpAsync(
    "https://example.org/status",
    fetchOptions: new HtmlHttpFetchOptions { MaximumResponseBytes = 8 * 1024 * 1024 },
    cancellationToken: timeout.Token);

Choose an extraction workflow

HtmlExtractionPlanner inspects page signals before you decide whether static parsing, a browserless relay, or rendered browser extraction is appropriate.

using HtmlTinkerX;

HtmlExtractionPlan plan = HtmlExtractionPlanner.Analyze(
    html,
    new Uri("https://example.org/status"));

Console.WriteLine($"{plan.RecommendedMode}: {plan.Confidence}");
foreach (string reason in plan.Reasons) {
    Console.WriteLine(reason);
}

Crawl a bounded website scope

using HtmlTinkerX;

HtmlCrawlResult result = await HtmlCrawler.CrawlAsync(
    "https://example.org/docs/",
    new HtmlCrawlOptions {
        MaxDepth = 2,
        MaxPages = 100,
        PathPrefix = "/docs/",
        IncludeMarkdown = true
    });

Console.WriteLine($"Fetched {result.Pages.Count} pages");

The crawler restricts requests to the starting host, honors robots.txt, and uses sitemaps by default. Review HtmlCrawlOptions before crawling sites you do not control.

See the repository for PowerShell examples, browser automation, API discovery, SSO handoff analysis, and package documentation.

HtmlTinkerX is available under the MIT License. See the LICENSE file included in the package.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on HtmlTinkerX:

Package Downloads
PowerForge.Web

PowerForge.Web static-site engine and reusable website build components.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 1,351 7/18/2026
2.0.20 87 7/18/2026
2.0.19 526 7/15/2026
2.0.18 430 7/12/2026
2.0.17 96 7/5/2026
2.0.16 101 6/23/2026
2.0.15 155 6/15/2026
2.0.14 110 6/9/2026
2.0.13 81 6/8/2026
2.0.12 76 6/8/2026
2.0.11 180 5/14/2026
2.0.10 86 5/13/2026
2.0.9 78 5/12/2026
2.0.8 88 5/10/2026
2.0.7 679 2/5/2026
2.0.6 6,068 1/2/2026
2.0.5 986 9/21/2025
2.0.1 228 9/1/2025
2.0.0 860 7/20/2025