>HTML TO MARKDOWN

get-md

A fast, lightweight HTML, PDF, DOCX, and Markdown to Markdown converter optimized for LLM consumption. Pass in raw HTML, PDF files, DOCX documents, Markdown files, or a URL and get clean, structured Markdown back — as a library or from the command line.

$ getmd https://example.com -o page.md --verbose
$ getmd handbook.pdf -o handbook.md
$ getmd document.docx -o document.md
Written to page.md
Input: 45320 chars
Output: 8956 chars
Time: 287ms
$ head page.md
---
title: Example Domain
siteName: IANA
readingTime: 1
wordCount: 142
---


# Example Domain

This domain is for use in illustrative
examples in documents...
87GitHub Stars
6Contributors
5Forks
271Community

Clean Markdown. Built for models.

get-md is a fast, lightweight HTML, PDF, DOCX, and Markdown to Markdown converter optimized for LLM consumption. The standard path uses Turndown and Mozilla Readability to return clean, structured Markdown in under 100ms.

Built by the Nano Collective rather than a company, it runs as a typed library or a CLI, ships no forced telemetry, and keeps the optional AI conversion on a local model so your content never leaves your machine.

Premium capabilities.
Zero paid tiers.

Sub-100ms

Turndown and Mozilla Readability convert clean, structured Markdown in under 100ms, with no model download required.

Flexible Inputs

Pass raw HTML, PDF files, DOCX documents, Markdown files, or a URL. get-md handles fetching, retries, and content extraction for you.

Optional LLM

Enable a local ReaderLM-v2 model for higher-quality conversion when a page needs it. Entirely on your machine.

Metadata Extraction

Pulls title, author, reading time, and more into clean YAML frontmatter, ready for downstream pipelines.

Content Filtering

Toggle images, links, and tables, or strip noise entirely. Keep exactly the signal your model needs.

Library & CLI

Use it as a typed Node.js library or straight from the terminal. Same engine, whichever fits your workflow.

React Native

Full React Native support means the same converter runs in your mobile app, not just on the server.

Batch & Sitemap

Crawl an entire sitemap or a list of URLs with bounded concurrency, then write one file per page.

Realistic workflows.

get-md handles single pages, content filtering, and whole sitemaps from the terminal or your codebase.

Convert
$ getmd https://blog.example.com/post -o post.md -v
Written to post.md
Input: 45320 chars
Output: 8956 chars
Time: 287ms
Library
import { convertToMarkdown }
from "@nanocollective/get-md";
const { markdown, metadata } =
await convertToMarkdown(
"https://example.com"
);
metadata.wordCount
=> 1247
Crawl
$ getmd --sitemap example.com/sitemap.xml -o ./out
Fetching sitemap...
Found 47 URL(s); starting batch...
✓ [1/47] /blog/post-1 → blog-post-1.md
✓ [2/47] /blog/post-2 → blog-post-2.md
✗ [3/47] /draft (404 Not Found)
Batch complete: 46 ok, 1 error, 15.3s

Install in seconds.

Zero complex setup. Available on your favorite package manager.

NPM
npm install @nanocollective/get-md
Global
npm install -g @nanocollective/get-md
NPX
npx @nanocollective/get-md https://example.com

Why developers choose get-md

100% Open Source

Read the code. Audit the code. Improve the code. It belongs to the community, not a corporation.

Fast by Default

The standard path is pure TypeScript and ships no heavy native binaries. Convert thousands of pages without waiting.

Local LLM Option

When you do want AI-powered conversion, it runs on a local model. Your content never leaves your machine.

Built for LLMs

Output is tuned for token efficiency and clean structure, exactly what retrieval and prompting pipelines need.

Library or CLI

Drop it into a TypeScript project or script it from the shell. No lock-in to a single way of working.

Community Driven

Features are built based on what developers actually need, not what looks good in a marketing pitch.

Supported by

Sponsorship funds the people building open, privacy-respecting AI tools, and keeps every line of it free at the point of use.

Become a sponsor
[ Join the Collective ]

Build with us.

Join developers building the future of local-first AI tooling.