MarkItDown vs Docling vs Marker vs LlamaParse (2026): PDF to Markdown for LLMs
By Stackdrop Editorial Team · Last updated October 18, 2026
Last checked: Oct 18, 2026
RAG pipelines and coding agents need text they can read, and Markdown keeps headings, lists and tables while staying close to plain text. This page compares six ways to get there: four open-source libraries you run yourself, one hosted API and one browser tool.
How we wrote this: every license, price and feature below comes from each project's own README, license file or pricing page, checked October 18, 2026. We haven't run these tools on our own documents, and we don't quote third-party benchmark scores. Output quality depends on your PDFs, so test a handful of your worst files before you pick one.
What makes a PDF hard to convert
- Scans. A scanned page has no text layer, so the tool needs OCR or a vision model.
- Tables. Merged cells and multi-row headers are where converters differ most.
- Layout. Two-column papers and sidebars need the right reading order.
- Formulas. Academic PDFs need math kept as LaTeX, not mangled text.
At a glance
| Tool | License or price (official site, Oct 18, 2026) | Where it runs | Scanned pages |
|---|---|---|---|
| MarkItDown | MIT, free | Your machine (Python) | Through an optional plugin that calls an LLM vision model |
| Docling | MIT code; models under their own licenses | Your machine, also as an API server | Built-in OCR |
| Marker | Apache 2.0 code; model weights free under a $5M funding/revenue threshold | Your machine (GPU, CPU or Apple Silicon) | Built-in OCR through a local model server |
| MinerU | MinerU Open Source License (Apache 2.0 plus extra terms) | Your machine by default | Built-in OCR |
| LlamaParse | Free plan with 10K credits a month; paid from $50 a month | LlamaIndex cloud | Yes |
| PDF to MD | Free local mode; Pro $5.75 a month billed yearly | Your browser, plus paid cloud OCR | Paid OCR pages |
1. MarkItDown
Who it's for: developers converting many file types inside a Python script or an agent.
What the official README says: a lightweight Python utility from Microsoft, MIT-licensed, for Python 3.10 through 3.14. It converts PDF, Word, PowerPoint, Excel, images, audio, HTML, CSV, JSON, XML, ZIP files, YouTube URLs and EPubs. OCR for PDFs comes from the separate markitdown-ocr plugin, which sends images to an LLM vision model through an OpenAI-compatible client; without a client, OCR is skipped. A markitdown-mcp package exposes it to agents.
Key trade-off: the README says its output is meant for text analysis tools and "may not be the best option for high-fidelity document conversions". It also warns that it reads files with the privileges of the running process, so sanitize inputs in untrusted environments.
2. Docling
Who it's for: RAG builders with tables, scans and complex layouts who want everything local.
What the official README says: MIT-licensed code, started at IBM Research Zurich and hosted by the LF AI & Data Foundation. It parses page layout, reading order, table structure, code and formulas, has OCR for scanned PDFs, and supports local execution for sensitive data and air-gapped setups. It exports Markdown, HTML, DocTags and lossless JSON, integrates with LangChain, LlamaIndex, CrewAI and Haystack, and ships an MCP server and an API server.
Key trade-off: the code is MIT, but the README points you to each model's own license, so check those before commercial use.
3. Marker
Who it's for: builders converting academic or technical PDFs where tables, equations and inline math have to survive.
What the official README says: Marker, from Datalab, converts PDF, image, PPTX, DOCX, XLSX, HTML and EPUB files, and formats tables, forms, equations, inline math, links and code blocks. Output can be Markdown, JSON, HTML or chunks. A `--use_llm` flag adds an LLM pass with Gemini, Claude, OpenAI-compatible, Azure, Vertex, OpenRouter or Ollama models. OCR runs through a local inference server: vLLM in Docker on NVIDIA GPUs, or the llama.cpp `llama-server` binary on CPU and Apple Silicon.
Key trade-off: the code is Apache 2.0, but the model weights use a modified Open Rail-M license that's free for research, personal use and startups under $5M in funding or revenue. Beyond that, you need a commercial license from Datalab.
4. MinerU
Who it's for: builders who parse long, formula-heavy or scanned documents, often through an agent, and want local parsing by default.
What the official README says: a command-line document reader for agents from OpenDataLab. It parses PDFs (including scans and academic papers), images, Office files, HTML, EPUB and CSV, with four quality tiers from a fast preview up to an advanced mode. It renders to Markdown, HTML, LaTeX, DOCX and structured JSON. Parsing is local unless you pass `--remote`. The default install runs on CPU; NVIDIA GPU users install the `[full]` extra. It may collect anonymous telemetry, which you can turn off; the README says that excludes document contents.
Key trade-off: its license is Apache 2.0 with added terms. Commercial use is allowed, but a separate license is needed above 100 million monthly active users or $20M in monthly revenue, and an online service built on MinerU must say so publicly.
5. LlamaParse
Who it's for: teams that would rather pay per page than run parsing models themselves.
What the official site says: a commercial, hosted parser that is not open source. The Free plan includes 10K credits a month, Starter is $50 a month with 40K credits, Pro is $500 a month with 400K credits, and Enterprise is custom. 1,000 credits cost $1.25. Basic parsing costs as little as 1 credit a page, and layout-aware agentic parsing costs more. Output includes Markdown, plain text, JSON, XLSX and HTML tables. Cached data is kept for 48 hours, caching can be turned off, and Enterprise adds private VPC deployment.
Key trade-off: your documents go to LlamaIndex's cloud unless you're on an Enterprise VPC deal, and costs scale with page count and the parsing tier you choose.
6. PDF to MD
Who it's for: people who want Markdown for Obsidian, Notion or an AI chat without installing anything.
What the official site says: free local conversion runs in your browser, so files stay on your device, for PDFs up to 50 MB and 500 pages. The free plan adds 5 OCR pages after signup and 100 cloud conversions a month. Pro is $7.90 billed monthly, or $5.75 a month billed $69 yearly, with 300 OCR pages a month and API and MCP access on the same credits. An OCR Pack is $5 for 200 pages, valid for 12 months.
Key trade-off: the site says scans, complex tables, formulas, multi-column layouts and missing Chinese, Japanese or Korean text may need its paid OCR mode.
How to choose
- Many file types, fast, inside a script: MarkItDown.
- Tables, scans and layout, fully local, permissive license: Docling.
- Equations and math-heavy papers: Marker, after reading its model-weights license.
- Long or scanned documents read by an agent: MinerU.
- No models to run, pay per page: LlamaParse.
- One-off files in the browser, no install: PDF to MD.
Run your five hardest PDFs through two candidates and compare the Markdown before you commit. For tools to build the rest of an AI app, browse all tools.
FAQ
What is the best tool to convert PDF to Markdown for LLMs? It depends on your documents. MarkItDown suits clean text and many file types, Docling and MinerU handle scans and tables locally, Marker focuses on equations, LlamaParse is a hosted option, and PDF to MD runs in the browser. Facts are from each official site, checked October 18, 2026.
Is there a free PDF to Markdown converter? MarkItDown and Docling are MIT-licensed. Marker and MinerU are free to self-host within their license terms. PDF to MD converts locally in the browser for free, and LlamaParse's Free plan includes 10K credits a month.
Which PDF to Markdown tool handles scanned PDFs? Docling, Marker and MinerU include OCR. MarkItDown needs its markitdown-ocr plugin and an LLM vision model. LlamaParse and PDF to MD offer OCR as part of their paid or credit-based plans.
Can I use Marker commercially? The code is Apache 2.0. The model weights are free for research, personal use and startups under $5M in funding or revenue; above that, Datalab's README points to its commercial license.
Did Stackdrop test these tools? No. We haven't run these on our own documents. This page uses facts from each project's README, license and pricing pages, checked October 18, 2026.
Sources (checked Oct 18, 2026)
- MarkItDown README and license: https://github.com/microsoft/markitdown
- Docling README and license: https://github.com/docling-project/docling
- Marker README and license: https://github.com/datalab-to/marker
- MinerU README: https://github.com/opendatalab/MinerU and license: https://github.com/opendatalab/MinerU/blob/master/LICENSE.md
- LlamaParse: https://www.llamaindex.ai/llamaparse and pricing: https://www.llamaindex.ai/pricing
- PDF to MD: https://pdf-to-md.app/ and pricing: https://pdf-to-md.app/pricing