0.16
A long-lived project that still receives updates
html-to-markdown is a native Ruby extension built on the shared Rust engine that powers the html-to-markdown project. It delivers identical HTML-to-Markdown output across languages, exposes inline image extraction, and ships with a CLI for automation workflows.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0.9, < 1.0
 Project Readme

html-to-markdown

Banner

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
  • 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.

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.