AI agents · OpenClaw · self-hosting · automation

Quick Answer

Best Open-Source PDF Parsers for RAG 2026: 5 Compared

Published:

The short answer

Start with Docling; switch to Marker for throughput, MinerU for maths-heavy or complex layouts, and olmOCR for scans. What matters for RAG is reading order, tables that survive as tables, headings you can chunk on, and a licence your company can live with. Versions and stars read from GitHub on November 19, 2026:

ParserLicence · versionStarsOutputRuns onStrengthCommercial limit
DoclingMIT · v2.150.1 (Nov 14, 2026)~70,800Markdown, HTML, lossless JSON (DoclingDocument)CPU; optional VLM (GraniteDocling)Widest formats, framework integrations, MCP serverNone
MarkerApache-2.0 code, OpenRAIL-M weights · v2.2.0 (Nov 12, 2026)~41,000Markdown, JSON, chunks, HTMLCPU, GPU, Apple MPSSpeed with VLM-level accuracyWeights free under $5M funding/revenue
MinerUApache-2.0 + extra terms · v4.2.3 (Nov 16, 2026)~84,000Markdown, JSON, HTML, LaTeX, DOCX and moreCPU; Intel, AMD, NVIDIA, Apple GPUsFormulas, complex layouts, cross-page tablesLicence needed above 100M MAU or $20M monthly revenue
UnstructuredApache-2.0 · 0.27.37 (Nov 6, 2026)~15,800Typed elements (JSON)CPUMany file types, element metadataNone
olmOCRApache-2.0 · v0.4.27 (Mar 12, 2026)~19,800Plain text / MarkdownGPUVLM OCR for scanned pagesNone

If you would rather pay per page, see the best PDF parsing API for RAG pipelines. For OCR models rather than parsing toolkits, see best open-source OCR models.

1. Docling — best default

Docling (IBM-originated, now under the docling-project organisation) parses PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, email, audio and more into one DoclingDocument format, with layout, reading order, table structure, code and formulas. It plugs into LangChain, LlamaIndex, CrewAI and Haystack, runs as a service (docling-serve) and ships an MCP server so agents can read documents directly. The MIT licence is the main reason it is the default: no revenue thresholds, no attribution clauses.

2. Marker — best throughput

Marker converts PDFs and Office files to Markdown, JSON or chunks and runs on GPU, CPU or MPS. Datalab’s own benchmark (OmniParseBench, 2,937 pages in 92 languages) reports its balanced mode at 80.5 and 16.9 pages per second against Docling’s 67.5 at 2.1 pages per second; treat those as vendor numbers and test on your documents. The catch is the weights licence: free for startups under $5M in funding or revenue, a paid licence above that.

3. MinerU — best for formulas and complex layouts

MinerU 4.x offers four tiers — Flash for fast indexing, Basic for OCR, Standard and Advanced for demanding layouts — and renders to nine targets including LaTeX. It recognises inline formulas and merges tables across pages, which matters for scientific papers and financial reports. Its licence is Apache-2.0 with additional terms: a separate commercial licence above 100 million monthly active users or $20 million monthly revenue, and an attribution obligation for online services.

4. Unstructured — best for mixed-format ingestion

Unstructured’s open-source library partitions documents into typed elements (Title, NarrativeText, Table, ListItem) with page numbers and coordinates, which makes element-aware chunking straightforward. It is less accurate than Docling or Marker on difficult PDFs but handles a long tail of formats in one API.

5. olmOCR — best for scanned pages

AI2’s olmOCR runs a vision-language model over page images, which helps with scans and handwriting where text extraction fails. It needs a GPU, and its last release was March 2026, so pair it with Docling or Marker for born-digital files.

How to pick in one afternoon

  1. Take 30 documents that look like your real corpus, including the ugliest ones.
  2. Run Docling and one challenger (Marker for speed, MinerU for formulas).
  3. Check three things by eye: reading order on multi-column pages, tables, and headings.
  4. Measure pages per second on your hardware and multiply out to your monthly volume.
  5. Confirm the licence with legal before you ship, especially for Marker and MinerU.

After parsing, chunk along headings: see best chunking libraries for RAG.

Last verified: November 19, 2026.

Sources