Lokad.Markdownify
0.1.0
Prefix Reserved
dotnet add package Lokad.Markdownify --version 0.1.0
NuGet\Install-Package Lokad.Markdownify -Version 0.1.0
<PackageReference Include="Lokad.Markdownify" Version="0.1.0" />
<PackageVersion Include="Lokad.Markdownify" Version="0.1.0" />
<PackageReference Include="Lokad.Markdownify" />
paket add Lokad.Markdownify --version 0.1.0
#r "nuget: Lokad.Markdownify, 0.1.0"
#:package Lokad.Markdownify@0.1.0
#addin nuget:?package=Lokad.Markdownify&version=0.1.0
#tool nuget:?package=Lokad.Markdownify&version=0.1.0
Lokad.Markdownify
Lokad.Markdownify is a small, dependency-free .NET library that converts a standalone HTML document or fragment to readable Markdown. Its primary use case is preparing HTML email bodies for agentic and text-oriented processing.
dotnet add package Lokad.Markdownify
Design goals
- No runtime package dependencies.
- Strictly linear time and memory in the input size.
- No recursive parsing or rendering.
- Deterministic, culture-independent output.
- Graceful recovery from arbitrary malformed HTML.
- Low allocation pressure: source slices and compact structural events instead of a DOM.
- No JavaScript execution, CSS layout, network access, or external-resource loading.
The converter is deliberately not a browser and not an HTML sanitizer. It extracts readable content; callers that render untrusted output in a security-sensitive context must apply the protections required by that renderer.
API
using Lokad;
string markdown = Markdownify.Convert("<p>Hello <strong>world</strong>.</p>");
Expected result:
Hello **world**.
See the conversion specification and the architecture note for the v1 contract under development.
The performance note describes the linearity argument, reproducible diagnostic harness, and current local baseline.
Building
The .NET 10 SDK is required.
dotnet restore
dotnet build --no-restore
dotnet test --no-build
The named-entity table is generated from Python's HTML5 entity catalog and is committed to the repository:
python tools/generate_html_named_entities.py
NuGet packages must be produced in Release configuration and are written to artifacts/nuget/:
dotnet pack src/Lokad.Markdownify/Lokad.Markdownify.csproj --configuration Release --no-build
License
Lokad.Markdownify is available under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 148 | 7/20/2026 |
Initial dependency-free, non-recursive HTML-to-Markdown converter focused on malformed and email HTML.