← Open Source

A fast, lightweight HTML to Markdown converter optimized for LLM consumption. Uses proven parsing libraries to deliver clean, well-structured markdown with intelligent content extraction and noise filtering.

AI EngineeringGive agent knowledgeTypeScript
Momentum
+0stars in 24 hours0.0%
97
Stars
7
Forks
+0
This week
6
Contributors
Created 2025-10-23 · Updated 2026-11-26 · #26606 today
Top developers
README

get-md

A fast, lightweight HTML, PDF, DOCX, and Markdown to Markdown converter optimized for LLM consumption — built by the Nano Collective, a community collective building AI tooling not for profit, but for the community. Everything we build is open, transparent, and driven by the people who use it.

Lightning-fast (<100ms) with optional AI-powered conversion using a local LLM model. Pass in HTML, PDF, DOCX, Markdown files, or a URL and get clean, structured Markdown back — as a library or from the command line.


Quick Start

npm install @nanocollective/get-md
import { convertToMarkdown } from "@nanocollective/get-md";

const result = await convertToMarkdown("https://example.com");
console.log(result.markdown);

Or use the CLI:

npx @nanocollective/get-md https://example.com -o output.md
npx @nanocollective/get-md handbook.pdf -o output.md
npx @nanocollective/get-md document.docx -o output.md

Mermaid Diagrams

Diagrams are usually the first casualty of an HTML-to-Markdown conversion. get-md handles them four ways — the Diagrams & Mermaid guide covers each in full:

  • Preserved — a ```mermaid fence already in your HTML or Markdown comes out unchanged. On by default, no extra dependencies.
  • Recovered — when a docs site has already rendered a diagram to <svg>, get-md pulls the original source back out of the DOM. On by default.
  • Reconstructed — diagrams drawn into a PDF can be rebuilt by a remote vision model. Opt-in, best-effort; needs pdfjs-dist and @napi-rs/canvas.
  • Validated — validateMermaid: true parses every Mermaid block and annotates the ones that fail, keeping the original so you can repair it. Opt-in; needs mermaid.
npm install mermaid
const result = await convertToMarkdown(source, {
  inputType: "markdown",
  validateMermaid: true,
});

Run examples/mermaid-diagrams.ts to see all of it working offline.

Documentation

Full documentation is available online at docs.nanocollective.org or in the docs/ folder:

  • Getting Started — Installation, requirements, and your first conversion
  • API Reference — Full reference for the library API
  • CLI — Command-line interface usage and options
  • Guides — LLM-powered conversion, Mermaid diagrams, React Native, and configuration tips
  • Configuration — Config files and options reference
  • Community — Contributing, Discord, and how to help

Community

The Nano Collective is a community collective building AI tooling for the community, not for profit. We'd love your help.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store