PDF to Markdown for LLMs and RAG: open-source parsers (2026)
Our pick
Start with Marker if you want to turn PDFs into Markdown or JSON for an LLM pipeline. It installs with pip install marker-pdf, also converts images, Office files, HTML and EPUB, and runs on a GPU, a CPU or Apple's MPS. The code is Apache-2.0 licensed and the model weights carry the OpenRAIL-M licence. The table shows its last commit and latest release, and how the other tools compare.
Best for
- Many file types, not just PDF
datalab-to/markerConverts PDF, image, PPTX, DOCX, XLSX, HTML and EPUB files to Markdown, JSON, chunks or HTML. It formats tables and equations, extracts images and can use an LLM to improve accuracy.
- Bounding boxes for every element
opendataloader-project/opendataloader-pdfExtracts Markdown, JSON with bounding boxes and HTML from PDFs, with a local mode and an AI hybrid mode. It has Python, Node.js and Java SDKs, needs Java installed and is Apache 2.0.
- Scanned pages and images in many languages
PaddlePaddle/PaddleOCRAn OCR toolkit that turns PDFs and images into Markdown or JSON and supports many languages. It includes a document parsing vision-language model and a structure-aware converter.
- A document pipeline with partitioning and chunking
Unstructured-IO/unstructuredOpen-source components for ingesting and pre-processing PDFs, HTML, Word files and more into structured data for language models. The library is free and Apache 2.0 licensed.
- Conversion by a vision LLM of your choice
MarkPDFdown/markpdfdownA command-line tool that sends pages to a multimodal model through LiteLLM and returns Markdown, with page range selection. It supports OpenAI, OpenRouter and Requesty.
- A converter your AI coding tool can call
SylphxAI/anymdA Rust MCP server and command-line tool that turns PDF, Word, PowerPoint, Excel, EPUB, HTML and images into Markdown on your machine, with no API key. Set it up with npx -y @sylphx/anymd setup.
The repos compared
Checked on Nov 27, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| datalab-to / marker Converts PDFs and other documents to Markdown, JSON, chunks and HTML. | 41,147 GitHub (opens in new tab) | Active Dec 1, 2026 | v2.2.0, Nov 12, 2026 | Apache-2.0 | NVIDIA GPU: Docker plus the NVIDIA Container Toolkit.; CPU / Apple Silicon: the⦠|
| opendataloader-project / opendataloader-pdf A PDF parser that outputs Markdown, JSON with bounding boxes and HTML. | 30,383 GitHub (opens in new tab) | Active Dec 1, 2026 | v2.5.24, Nov 23, 2026 | Apache-2.0 | |
| Unstructured-IO / unstructured Ingests and pre-processes PDFs, HTML and Word files into structured data for LLMs. | 15,811 GitHub (opens in new tab) | Active Dec 2, 2026 | 0.27.38, Nov 24, 2026 | Apache-2.0 | |
| PaddlePaddle / PaddleOCR An OCR toolkit that turns PDFs and images into Markdown or JSON. | 93,590 GitHub (opens in new tab) | Active Sep 16, 2026 | v3.7.0, Jun 11, 2026 | Apache-2.0 | |
| MarkPDFdown / markpdfdown A command-line tool that converts PDFs to Markdown using a vision LLM. | 2,329 GitHub (opens in new tab) | Active Sep 23, 2026 | 1.2.0, Jan 25, 2026 | Apache-2.0 | Python 3.9+; uv (recommended for package management) or conda/pip; Dependencies⦠|
| NanoNets / docext An on-premises toolkit for converting PDFs and images to Markdown and extracting fields. | 2,087 GitHub (opens in new tab) | Inactive Mar 17, 2026 | v0.1.14, Jun 30, 2025 | Apache-2.0 | |
| yfedoseev / pdf_oxide A PDF library with a Rust core for text extraction and Markdown conversion. | 1,224 GitHub (opens in new tab) | Active Dec 1, 2026 | v0.3.78, Sep 8, 2026 | Apache-2.0 | |
| SylphxAI / anymd A Rust MCP server and CLI that turns many file types into Markdown. | 1,084 GitHub (opens in new tab) | Active Nov 30, 2026 | v8.5.19, Nov 27, 2026 | MIT | |
| xberg-io / xberg A document engine that extracts text, tables and metadata from PDFs, Office files, images and more. | 9,645 GitHub (opens in new tab) | Active Dec 1, 2026 | v1.5.4, Nov 25, 2026 | MIT | |
| docling-project / docling A Python tool that prepares documents for generative AI. | 71,293 GitHub (opens in new tab) | Active Dec 1, 2026 | v2.152.0, Nov 23, 2026 | MIT | |
| opendatalab / MinerU Turns PDFs and Office documents into Markdown or JSON for LLMs. | 84,602 GitHub (opens in new tab) | Active Dec 1, 2026 | mineru-4.3.0-released, Dec 1, 2026 | Custom | |
| microsoft / markitdown A lightweight Python utility that converts files such as Word, PowerPoint and PDF to Markdown. | 199,330 GitHub (opens in new tab) | Active Dec 1, 2026 | v0.1.9, Oct 21, 2026 | MIT |
Install commands
Copied from each repo. Read its setup steps before you run anything.
datalab-to/marker
pip install marker-pdfopendataloader-project/opendataloader-pdf
pip install -U opendataloader-pdfUnstructured-IO/unstructured
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh Questions
What is the best way to convert a PDF to Markdown for an LLM?
Use a parser that keeps headings, tables and equations. Marker converts PDFs to Markdown or JSON and formats tables and equations. PaddleOCR and docext turn PDFs and images into Markdown with vision-language models, and MarkPDFdown sends pages to a vision LLM you choose.
What is the best PDF parser for RAG?
It depends on your documents. OpenDataLoader PDF returns JSON with bounding boxes, which helps when you need to point back to the page. Unstructured prepares many file types for chunking and indexing. The table shows each licence and its latest release.
Can I parse documents locally, without sending them to an API?
Yes. docext is an on-premises toolkit, anymd runs on your machine with no API key, and OpenDataLoader PDF has a deterministic local mode. MarkPDFdown sends pages to a model provider such as OpenAI or OpenRouter.
Do these tools handle scanned PDFs?
PaddleOCR is an OCR toolkit for PDFs and images, and docext converts images to Markdown with vision-language models. Marker converts images as well as PDFs. anymd runs OCR on images.
