KreuzbergDev.HtmlToMarkdown 3.2.5

dotnet add package KreuzbergDev.HtmlToMarkdown --version 3.2.5
                    
NuGet\Install-Package KreuzbergDev.HtmlToMarkdown -Version 3.2.5
                    
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="KreuzbergDev.HtmlToMarkdown" Version="3.2.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KreuzbergDev.HtmlToMarkdown" Version="3.2.5" />
                    
Directory.Packages.props
<PackageReference Include="KreuzbergDev.HtmlToMarkdown" />
                    
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 KreuzbergDev.HtmlToMarkdown --version 3.2.5
                    
#r "nuget: KreuzbergDev.HtmlToMarkdown, 3.2.5"
                    
#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 KreuzbergDev.HtmlToMarkdown@3.2.5
                    
#: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=KreuzbergDev.HtmlToMarkdown&version=3.2.5
                    
Install as a Cake Addin
#tool nuget:?package=KreuzbergDev.HtmlToMarkdown&version=3.2.5
                    
Install as a Cake Tool

html-to-markdown

<div align="center" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0;">

<a href="https://crates.io/crates/html-to-markdown-rs"> <img src="https://img.shields.io/crates/v/html-to-markdown-rs?label=Rust&color=007ec6" alt="Rust"> </a> <a href="https://pypi.org/project/html-to-markdown/"> <img src="https://img.shields.io/pypi/v/html-to-markdown?label=Python&color=007ec6" alt="Python"> </a> <a href="https://www.npmjs.com/package/@kreuzberg/html-to-markdown-node"> <img src="https://img.shields.io/npm/v/@kreuzberg/html-to-markdown-node?label=Node.js&color=007ec6" alt="Node.js"> </a> <a href="https://www.npmjs.com/package/@kreuzberg/html-to-markdown-wasm"> <img src="https://img.shields.io/npm/v/@kreuzberg/html-to-markdown-wasm?label=WASM&color=007ec6" alt="WASM"> </a> <a href="https://central.sonatype.com/artifact/dev.kreuzberg/html-to-markdown"> <img src="https://img.shields.io/maven-central/v/dev.kreuzberg/html-to-markdown?label=Java&color=007ec6" alt="Java"> </a> <a href="https://pkg.go.dev/github.com/kreuzberg-dev/html-to-markdown/packages/go/v3/htmltomarkdown"> <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/html-to-markdown?label=Go&color=007ec6&filter=v3.0.0" alt="Go"> </a> <a href="https://www.nuget.org/packages/KreuzbergDev.HtmlToMarkdown/"> <img src="https://img.shields.io/nuget/v/KreuzbergDev.HtmlToMarkdown?label=C%23&color=007ec6" alt="C#"> </a> <a href="https://packagist.org/packages/kreuzberg-dev/html-to-markdown"> <img src="https://img.shields.io/packagist/v/kreuzberg-dev/html-to-markdown?label=PHP&color=007ec6" alt="PHP"> </a> <a href="https://rubygems.org/gems/html-to-markdown"> <img src="https://img.shields.io/gem/v/html-to-markdown?label=Ruby&color=007ec6" alt="Ruby"> </a> <a href="https://hex.pm/packages/html_to_markdown"> <img src="https://img.shields.io/hexpm/v/html_to_markdown?label=Elixir&color=007ec6" alt="Elixir"> </a> <a href="https://kreuzberg-dev.r-universe.dev/htmltomarkdown"> <img src="https://img.shields.io/badge/R-htmltomarkdown-007ec6" alt="R"> </a> <a href="https://github.com/kreuzberg-dev/html-to-markdown/releases"> <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C"> </a> <a href="https://docs.html-to-markdown.kreuzberg.dev"> <img src="https://img.shields.io/badge/Docs-kreuzberg.dev-007ec6" alt="Documentation"> </a> <a href="https://github.com/kreuzberg-dev/html-to-markdown/blob/main/LICENSE"> <img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License"> </a> <a href="https://docs.html-to-markdown.kreuzberg.dev/demo/"> <img src="https://img.shields.io/badge/%E2%96%B6%EF%B8%8F_Live_Demo-007ec6" alt="Live Demo"> </a> </div>

<img width="3384" height="573" alt="Banner" src="https://github.com/user-attachments/assets/478a83da-237b-446b-b3a8-e564c13e00a8" />

<div align="center" style="margin-top: 20px;"> <a href="https://discord.gg/pXxagNK2zN"> <img height="22" src="https://img.shields.io/badge/Discord-Join%20our%20community-7289da?logo=discord&logoColor=white" alt="Discord"> </a> </div>

High-performance HTML to Markdown conversion powered by Rust. Ships as native bindings for Rust, Python, TypeScript/Node.js, Ruby, PHP, Go, Java, C#, Elixir, R, C (FFI), and WebAssembly with identical rendering across all runtimes.

Documentation | Live Demo | API Reference

Highlights

  • 150-280 MB/s throughput (10-80x faster than pure Python alternatives)
  • 12 language bindings with consistent output across all runtimes
  • Structured resultconvert() returns ConversionResult with content, metadata, tables, images, and warnings
  • Metadata extraction — title, headers, links, images, structured data (JSON-LD, Microdata, RDFa)
  • Visitor pattern — custom callbacks for content filtering, URL rewriting, domain-specific dialects
  • Table extraction — extract structured table data (cells, headers, rendered markdown) during conversion
  • Secure by default — built-in HTML sanitization via ammonia

Quick Start

# Rust
cargo add html-to-markdown-rs

# Python
pip install html-to-markdown

# TypeScript / Node.js
npm install @kreuzberg/html-to-markdown-node

# Ruby
gem install html-to-markdown

# CLI
cargo install html-to-markdown-cli
# or
brew install kreuzberg-dev/tap/html-to-markdown

See the Installation Guide for all languages including PHP, Go, Java, C#, Elixir, R, and WASM.

Usage

convert() is the single entry point. It returns a structured ConversionResult:

# Python
from html_to_markdown import convert

result = convert("<h1>Hello</h1><p>World</p>")
print(result["content"])        # # Hello\n\nWorld
print(result["metadata"])       # title, links, headings, …
// TypeScript / Node.js
import { convert } from "@kreuzberg/html-to-markdown-node";

const result = convert("<h1>Hello</h1><p>World</p>");
console.log(result.content);    // # Hello\n\nWorld
console.log(result.metadata);   // title, links, headings, …
// Rust
use html_to_markdown_rs::convert;

let result = convert("<h1>Hello</h1><p>World</p>", None)?;
println!("{}", result.content.unwrap_or_default());

Language Bindings

Language Package Install
Rust html-to-markdown-rs cargo add html-to-markdown-rs
Python html-to-markdown pip install html-to-markdown
TypeScript / Node.js @kreuzberg/html-to-markdown-node npm install @kreuzberg/html-to-markdown-node
WebAssembly @kreuzberg/html-to-markdown-wasm npm install @kreuzberg/html-to-markdown-wasm
Ruby html-to-markdown gem install html-to-markdown
PHP kreuzberg-dev/html-to-markdown composer require kreuzberg-dev/html-to-markdown
Go htmltomarkdown go get github.com/kreuzberg-dev/html-to-markdown/packages/go/v3
Java dev.kreuzberg:html-to-markdown Maven / Gradle
C# KreuzbergDev.HtmlToMarkdown dotnet add package KreuzbergDev.HtmlToMarkdown
Elixir html_to_markdown mix deps.get html_to_markdown
R htmltomarkdown install.packages("htmltomarkdown")
C (FFI) releases Pre-built .so / .dll / .dylib

Part of the Kreuzberg Ecosystem

html-to-markdown is developed by kreuzberg.dev and powers the HTML conversion pipeline in Kreuzberg, a document intelligence library for extracting text from PDFs, images, and office documents.

Contributing

Contributions welcome! See CONTRIBUTING.md for setup instructions and guidelines.

License

MIT License — see LICENSE for details.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
3.2.5 35 4/18/2026
3.2.4 38 4/17/2026
3.2.3 39 4/17/2026
3.2.2 38 4/16/2026
3.2.1 32 4/16/2026
3.2.0 39 4/14/2026
3.1.0 93 4/1/2026
3.0.2 85 4/1/2026
3.0.1 85 3/31/2026
3.0.0 86 3/30/2026
2.30.0 95 3/27/2026
2.29.0 88 3/22/2026
2.28.6 86 3/20/2026
2.28.5 85 3/19/2026
2.28.4 93 3/13/2026
2.28.3 89 3/10/2026
2.28.2 90 3/9/2026
2.28.1 89 3/6/2026
2.28.0 87 3/5/2026
2.27.3 84 3/5/2026
Loading failed