Comparisons

Best open source document parsers
The best open source document parser is Docling: MIT-licensed, over twenty input formats, with layout, table and formula understanding.
Last updated December 2026
The best open source document parser for most teams is Docling, because it is MIT-licensed, hosted by the LF AI & Data Foundation, reads more than twenty input formats including PDF, Office files, images and email, and handles layout, reading order, tables and formulas with optional vision-language models. Marker is the stronger choice for high-accuracy PDF to Markdown when its model licence fits your company, and PyMuPDF is the fastest option for digital PDFs if AGPL terms or a commercial licence suit you.
We make Exabase, whose Extract API is a hosted parser rather than open source. This guide covers the open source tools on their own merits, and the closing section explains when a managed service is the better trade.
What a document parser has to get right
PDF parsing looks simple until you meet real files. A parser has to recover the reading order of multi-column pages, rebuild tables that span pages, keep headings and lists, extract formulas and figures, and fall back to OCR for a scanned PDF with no text layer. For AI use the output also matters: clean Markdown or structured JSON that chunks well and keeps page references for citations.
Open source parsers fall into three groups. Rule-based libraries read the PDF’s internal structure and are fast on digital files. Pipeline tools combine layout analysis models, table models and OCR. Newer tools run a vision-language model over page images, which copes better with messy scans and handwriting but needs a GPU. Most mature projects now offer more than one mode.
We judged each tool on accuracy across digital and scanned files, table extraction, format coverage, output quality for LLMs, hardware needs and, above all, licence. A permissive licence such as MIT or Apache 2.0 lets you ship the parser inside a commercial product. AGPL and restricted model licences can require you to open your own code or buy a licence, so read them before you build.
Verdict
Best overall: Docling, for an MIT-licensed parser with the widest format coverage and strong layout understanding.
Best for high-accuracy PDF to Markdown: Marker.
Best for academic papers and formula-heavy PDFs: MinerU.
Best for broad ETL across many file types: Unstructured.
Best for scanned pages and handwriting with a GPU: olmOCR.
Best for fast parsing of digital PDFs: PyMuPDF.
At a glance
Parser | Licence | Approach | Hardware | Best output | Verdict |
|---|---|---|---|---|---|
Docling | MIT (models vary) | Layout pipeline, optional VLM | CPU; GPU for VLM | Markdown, lossless JSON | Best overall |
Marker | Apache 2.0 code; restricted weights | Layout models, optional LLM pass | CPU or GPU | Markdown, JSON, chunks | Best PDF to Markdown |
MinerU | See project licence | Four tiers up to VLM | CPU to 8 GB+ GPU | Markdown, LaTeX, content lists | Best for papers and formulas |
Unstructured | Apache 2.0 | Partitioning into elements | CPU | Typed elements | Best for broad ETL |
olmOCR | Apache 2.0 | 7B vision-language model | 12 GB+ NVIDIA GPU | Markdown text | Best for scans and handwriting |
PyMuPDF | AGPL v3 or commercial | Rule-based on MuPDF | CPU | Markdown, JSON, text | Best for fast digital PDFs |
1. Docling: the best open source document parser overall
Best for teams that want one permissively licensed parser for every file type.
What it is. An open source document converter started by IBM Research Zurich and now hosted by the LF AI & Data Foundation. It reads PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, LaTeX, Markdown, OpenDocument files, EML and MSG email, XBRL, and audio and video files, and outputs Markdown, HTML, DocTags or lossless JSON.
Strengths. PDF understanding covers page layout, reading order, table structure, code, formulas and image classification, with OCR for scans. A VLM pipeline can run models such as GraniteDocling for harder pages, and an MCP server lets agents call Docling directly. The code is MIT-licensed; individual models carry their own licences.
Not ideal if you want the very highest accuracy on dense, messy PDFs without tuning, or you need a hosted API rather than a library to run.
Compared with the field. Docling has the broadest input coverage here and the cleanest licence. Marker often wins on raw PDF to Markdown quality, and PyMuPDF on speed. See the Docling review, Docling vs Marker and Docling alternatives.
2. Marker: best for high-accuracy PDF to Markdown
Best for converting PDFs and books into clean Markdown for LLMs.
What it is. A converter from Datalab for PDF, images, PPTX, DOCX, XLSX, HTML and EPUB in all languages, producing Markdown, JSON, HTML or a flat list of chunks for RAG.
Strengths. An optional LLM mode, enabled with a flag, adds a pass that merges tables across pages, handles inline maths and extracts form values, using Gemini, Claude, OpenAI-compatible or local Ollama backends with your own keys. Fast modes run on CPU or Apple Silicon; the balanced mode uses a local inference server on a GPU.
Licence. The code is Apache 2.0. The model weights use a modified AI Pubs Open Rail-M licence that is free for research, personal use and startups under $5M in funding or revenue; larger commercial users need a paid licence.
Not ideal if your company is above that threshold and does not want to buy a licence.
Compared with the field. Marker is the quality pick for PDF to Markdown, at the cost of a more restrictive model licence than Docling’s. See Exabase vs Marker.
3. MinerU: best for academic and formula-heavy PDFs
Best for research papers, textbooks and technical documents with equations.
What it is. An open source parser from OpenDataLab that reads PDFs, images, Office files, EPUB, HTML and more, and renders Markdown, HTML, LaTeX, DOCX and structured content lists. It offers four parsing tiers, from a fast mode to an advanced VLM mode.
Strengths. Strong handling of tables, formulas and figures, a local document library with stable page and block locators for citations, and flexible hardware: the basic tier runs on CPU with about 2 GB of RAM, while advanced tiers want 8 GB or more of GPU memory for best speed.
Licence. MinerU links to its own licence file; check it against your intended use before shipping it in a product.
Not ideal if you need a simple, permissive licence without review, or a small dependency footprint.
Compared with the field. MinerU is a strong choice for scientific documents. Docling is the simpler default for mixed business files. See Exabase vs MinerU.
4. Unstructured: best for broad ETL
Best for pipelines that ingest many file types into a common element format.
What it is. An Apache 2.0 library that partitions images and documents such as PDFs, HTML and Word files into typed elements, ready for chunking and embedding. The company also sells a hosted Transform API.
Strengths. Wide file type support, a consistent element schema and a large ecosystem of connectors make it a common ingestion layer. The open source library is described as free and staying free.
Not ideal if accuracy on complex layouts is the priority. Unstructured’s own published comparison reports text accuracy of 0.715 for the open source library against 0.878 for its paid Transform API. See Unstructured pricing and the Unstructured review.
Compared with the field. Unstructured is the broadest ETL toolkit, while Docling gives better layout fidelity under a similar licence. See Docling vs Unstructured.
5. olmOCR: best for scans and handwriting with a GPU
Best for large batches of scanned documents where you control GPU capacity.
What it is. An Apache 2.0 toolkit from the Allen Institute for AI that converts PDF, PNG and JPEG pages to clean text and Markdown using a 7-billion-parameter vision-language model. It handles equations, tables and handwriting, removes headers and footers and aims for natural reading order.
Hardware and cost. Local inference needs a recent NVIDIA GPU with at least 12 GB of memory and about 30 GB of disk, or you can point it at an OpenAI-compatible inference server. The project states a cost of less than $200 per million pages converted.
Not ideal if you have no GPU budget, or need Office formats and structured JSON rather than text.
Compared with the field. olmOCR is the best open option for difficult scans at scale. For digital PDFs it is more machinery than you need. Our guide to OCR vs vision-language models explains the trade-off.
6. PyMuPDF: best for fast digital PDF parsing
Best for high-volume digital PDFs where speed and control matter.
What it is. A Python library built on the MuPDF engine for extracting, rendering and editing PDFs and other formats, including XPS, EPUB and images. It extracts text with layout information, detects tables and exports them to Markdown or pandas, and converts documents to Markdown or JSON for RAG.
Strengths. Very fast on digital files, mature, and much more than a parser: it also redacts, fills forms, merges and renders pages. OCR is available through RapidOCR or Tesseract.
Licence. GNU AGPL v3, with commercial licences from Artifex for proprietary applications. Office file support needs a separate add-on.
Not ideal if you need layout models for complex scans, or cannot meet AGPL terms. See Exabase vs PyMuPDF.
Compared with the field. PyMuPDF is the speed choice for clean PDFs, often used as a first pass before a heavier parser handles the hard pages.
When a managed parser is the better trade
Running an open source parser well means GPUs for the VLM modes, OCR paths for scans, separate tools for audio and video, queues, retries and upgrades as models improve. That is the job described in file extraction, and it is what Exabase Extract replaces. One endpoint accepts PDFs, Word documents, images, audio, video and web pages, detects scans and applies OCR, and returns text chunks with page numbers or timestamps. Invoices, resumes and contracts are recognised and returned with structured fields, and adding format=markdown returns the result as readable Markdown for an LLM prompt.
Results arrive by polling or webhook, failed jobs can be reprocessed without re-uploading, and stored files are deleted after one day. Free tools such as PDF to Markdown and PDF to JSON show the output, and the extraction guide covers the API. The trade-off is plain: you give up self-hosting and the ability to change the parser’s code, and you gain a pipeline you do not maintain. Our posts on why the PDF is the last unsolved file format and tables in PDFs cover the hard cases either way.
A real-world example
A research team indexes 400,000 papers for a literature agent. They run PyMuPDF first because most files are digital, which handles the bulk in hours. Pages where PyMuPDF finds little text or broken tables go to MinerU’s advanced tier for formulas, and a few thousand scanned conference proceedings go to olmOCR on a rented GPU. The outputs are normalised to Markdown with page numbers, chunked and embedded. The routing logic took a month to tune, which is the work a hosted service such as Extract absorbs. The document extraction use case and our note on scanned vs digital PDFs describe the same split.
How to choose
You want one permissively licensed parser for every format: choose Docling. You need the best PDF to Markdown quality and the model licence fits: choose Marker. Your documents are papers and formulas: choose MinerU. You are building ingestion across many file types: choose Unstructured. You have hard scans and GPU capacity: choose olmOCR. You process high volumes of digital PDFs and can meet AGPL or buy a licence: choose PyMuPDF. You would rather not run a parser at all: use a hosted API from the best document extraction APIs or the best PDF parsers.
How we compared
We checked each project’s repository and licence on 4 December 2026, and vendor claims such as olmOCR’s cost per million pages and Unstructured’s accuracy figures are reported as the projects state them. We did not run our own benchmark for this page. Checked December 2026.
Frequently asked questions
What is the best open source document parser?
Docling is the best open source document parser for most teams, because it is MIT-licensed, reads more than twenty formats and handles layout, tables and formulas. Marker is the best for high-accuracy PDF to Markdown when its model licence fits.
Which open source PDF parser is free for commercial use?
Docling (MIT), Unstructured (Apache 2.0) and olmOCR (Apache 2.0) allow commercial use. Marker’s code is Apache 2.0 but its model weights need a paid licence above $5M in funding or revenue, and PyMuPDF is AGPL unless you buy a commercial licence.
Is Docling better than Marker?
Docling has wider format support and a simpler licence; Marker often produces cleaner Markdown from complex PDFs, especially with its LLM mode. Many teams test both on a sample of their own files.
Which parser is best for scanned PDFs?
olmOCR is the strongest open option for scanned pages and handwriting if you have a GPU with at least 12 GB of memory. Docling and Marker also include OCR for lighter workloads.
Do open source parsers need a GPU?
Not always. PyMuPDF, Docling’s standard pipeline, Marker’s fast modes and MinerU’s basic tier run on CPU. VLM modes and olmOCR run far better on a GPU.
What is the difference between OCR and document parsing?
OCR turns images of text into characters. Document parsing also recovers structure: headings, tables, reading order and figures. See OCR vs IDP for how the terms relate.
Should I output Markdown or JSON for an LLM?
Markdown is easier for a model to read; JSON keeps structure for code to process. Many pipelines store both, as discussed in JSON vs Markdown for LLMs.
What licence is PyMuPDF under?
PyMuPDF is licensed under the GNU AGPL v3, with commercial licences available from Artifex Software for proprietary applications.
Is Unstructured open source?
Yes. The Unstructured library is Apache 2.0 and free. The company’s hosted Transform API is a separate paid product.
Is Exabase Extract open source?
No. Exabase Extract is a hosted API that parses PDFs, Office files, images, audio, video and web pages through one endpoint. It suits teams that would rather not run their own parsing pipeline.
How do I keep page numbers for citations?
Choose a parser that keeps page references in its output, such as Docling’s JSON or MinerU’s page and block locators, and carry them through chunking. Exabase Extract returns a page number on every document chunk.
Related pages: Best PDF parser, Best document extraction API, Docling vs Marker, Docling alternatives, Exabase vs Docling, Exabase vs Unstructured, PDF parsing, Document extraction, Extract, File extraction, Best handwriting OCR
Compare similar apps and tools:

6 best open source Firecrawl alternatives in 2026

AWS vs Google vs Azure agent memory compared (2026)

6 best web search APIs for AI agents in 2026

7 best vector databases for multi-tenant apps in 2026

5 best reverse image search APIs in 2026

6 best digital asset management APIs in 2026

6 best handwriting OCR APIs and tools in 2026

5 best receipt OCR APIs in 2026

6 best open source document parsers in 2026

6 best embedding models in 2026

6 best durable execution platforms for AI agents in 2026

7 best AI agent sandboxes in 2026

7 best file systems for AI agents in 2026

6 best knowledge graphs for AI agents in 2026

7 best AI context platforms in 2026

7 best RAG as a service platforms in 2026

6 best MCP memory servers in 2026

7 best reranking models in 2026

9 best file storage options for AI agents in 2026

5 best HTML to markdown APIs in 2026

7 best AI agent frameworks in 2026

6 best open source agent memory projects in 2026

6 best multimodal search APIs in 2026

7 best semantic search APIs in 2026

6 best company enrichment APIs in 2026

Best logo APIs in 2026 (after Clearbit)

5 best screenshot APIs in 2026

7 best link preview APIs in 2026

5 best resume parser APIs in 2026

8 best invoice extraction APIs in 2026

7 best video understanding APIs in 2026

7 best speech to text APIs in 2026

8 best PDF parsers for LLMs in 2026

7 best OCR APIs in 2026

7 best vector databases in 2026

8 best AI agent infrastructure tools in 2026

9 best RAG infrastructure platforms in 2026

9 best PDF extraction APIs in 2026

9 best web scraping APIs in 2026

9 best document extraction APIs in 2026