PyMuPDF vs Docling
A faster, lighter parser
alternative to Docling
PyMuPDF and Docling solve the same problem of turning PDFs into structured, LLM-ready output, but with opposite engineering philosophies. One is a lightweight engine you drop into anything. The other is a machine-learning pipeline built for a different set of trade-offs.
Let's explore the differences in install footprint, speed, ecosystem, and when to choose each.

Install size
Lowest footprint works best for containers, serverless, and at scale
Docling
- A Torch-based ML pipeline
- CUDA wheels included by default
Includes CUDA wheels by default
Models load at runtime
Larger surface to containerize & deploy
PyMuPDF
- A C-based PDF engine
- Layout model on top
Runs anywhere Python runs
No GPU required
No model downloads
Install size compares each package's default distribution; Docling's figure includes the CUDA wheels pulled in by its default install.
Speed
Fastest parsing core in the benchmark set
PyMuPDF
1.18s
vs PyPDF
35x
vs Markitdown
75.7x
Docling
N/A
Architectural Reason
PyMuPDF's parsing core is MuPDF, a C library. The layout model sits on top as a compact ONNX network. Docling routes documents through a Python and Torch pipeline with model loading at startup.

The independent testing above, conducted by LlamaIndex, found PyMuPDF to be the fastest PDF parser tested.
In LlamaIndex's August 2026 benchmark, PyMuPDF processed a 100 MB, 457-page PDF in 1.18 seconds — 35× faster than PyPDF and 75.7× faster than Markitdown. Docling wasn't included in the test.
This test measured standard PyMuPDF without its advanced layout features. The quality results below use the full PyMuPDF stack.
Ecosystem & maturity
The default PDF layer of the
Python ecosystem
Docling
18.0M
monthly downloads (2026-07)
PyMuPDF
114.9M
monthly downloads (2026-07)
PyMuPDF4LLM package alone
22.4M
monthly downloads,
outpacing all of Docling.
Real-World Adoption
langchain-community, at 45.5M monthly downloads, ships PyMuPDF loaders. In Korea and Japan the gap widens to 7.1x and 20.6x respectively.

Ten Years of Docs and Examples
Ten years of development also means ten years of documentation: a complete API reference, recipes, and tutorials covering the full engine, not just the conversion path.

Side by Side
How the two engines actually differ
Switching from Docling
Same job, less code
PyMuPDF4LLM is a single function call away from Docling's conversion path.
If you're already using Docling, you can switch to PyMuPDF4LLM with minimal code changes. The conversion path is a single function call away, and the output is the same Markdown format that Docling produces.
Docling
from docling.document_converter import DocumentConverter
md = DocumentConverter().convert("report.pdf").document.export_to_markdown()PyMuPDF
import pymupdf4llm
md = pymupdf4llm.to_markdown("report.pdf")FAQ
Questions people ask before switching
License
The legal model matters as much as the parser

Docling
Docling is MIT. MIT costs nothing and promises nothing. It is a legitimate model for teams prioritizing permissive licensing, but it does not include the procurement or support path that comes with the engine.

PyMuPDF
PyMuPDF is AGPL 3.0 with a commercial license available. If you ship it inside a product without open-sourcing your stack, you buy a commercial license from the company that builds the engine.
Both are legitimate models; know which one your deployment needs before you standardize. The commercial license is a procurement path with support behind it, and that same company answers your support tickets and keeps the parser maintained for the next decade.
The Decision
Which one fits your stack?
If you're building agents or pipelines that need fast, deterministic, deployable parsing, PyMuPDF is the stronger fit.
GET STARTED