Live Demo
Built for Performance
A Rust-powered conversion engine that handles real-world HTML with precision.
Blazing Fast
Written in Rust, compiled to WASM. 10-50x faster than JavaScript alternatives.
GFM Support
Tables, strikethrough, task lists, and fenced code blocks with full GitHub Flavored Markdown.
Configurable
Heading styles, link formats, code fences, and CSS selector filtering.
TypeScript
Full type definitions included. Autocomplete and type checking out of the box.
Zero Dependencies
Lightweight bundle. No bloat, no transitive dependencies to worry about.
Edge Cases
Proper escaping, nested lists, language detection, and special character handling.
Built for Real-World Use
From scraping to AI pipelines, supermarkdown handles the messy HTML you encounter in production.
Web Scraping
Clean scraped HTML by removing nav, ads, sidebars, and cookie banners. Extract just the content you need.
convert(html, {
excludeSelectors: [
'nav', 'header', 'footer',
'.sidebar', '.advertisement',
'.cookie-banner'
]
});LLM Pipelines
Prepare web content for RAG pipelines and LLM context. Clean, focused text without HTML artifacts.
// Extract article for LLM context
const markdown = convert(html, {
excludeSelectors: ['nav', 'aside'],
includeSelectors: ['article', 'main']
});Blog Processing
Convert blog posts while preserving code blocks, formatting, and language detection.
// Code blocks preserve language
// <pre><code class="language-rust">
// → ```rustDocumentation
Handle tables, definition lists, and nested structures common in technical docs.
// Tables with alignment
// <th align="right">Price</th>
// → | Price |
// | ----: |Available Everywhere
Pre-built binaries for Windows, macOS, and Linux (x64 & ARM64)
Node.js
Native bindings via NAPI-RS. Full TypeScript support.
npm install @vakra-dev/supermarkdownRust
Use directly as a Rust crate in your project.
cargo add supermarkdownCLI
Convert files from the command line or via stdin.
cargo install supermarkdown-cliGet Started in Seconds
One import, one function call.
import { convert } from '@vakra-dev/supermarkdown';
const html = '<h1>Hello</h1><p>World</p>';
const markdown = convert(html);
console.log(markdown);
// # Hello
//
// World