Step 02 of 22
Parsing & OCR
Turn PDFs, scans, slides and spreadsheets into structured text. Tables, headings and reading order are where most retrieval quality is won or lost. Bad parsing cannot be fixed later.
How to choose
- Digital PDFs and Office files: an open-source parser is usually enough.
- Scans, handwriting and complex tables: an OCR or vision-language model earns its cost.
- Test on your own worst documents, not on a vendor demo.
What to look for
The questions that separate the options, in order of how much they matter.
01
Results on your own worst documents
Parsers that look identical on a clean report diverge on scanned contracts, rotated pages and multi-level tables. Pick 20 to 50 of your hardest files, parse them with each candidate and diff the output against what a person reads. This beats any leaderboard, because the benchmarks below use document mixes that may not resemble yours.
02
Table structure
Tables are where parsers fail most visibly: merged cells, spanning headers and tables split across pages turn into run-on text. Benchmarks score this with TEDS (tree-edit-distance similarity between predicted and true table structure, higher is better). Check whether the parser keeps header rows when a table is split, because a row without its headers retrieves badly.
03
How to read OmniDocBench
OmniDocBench is the most cited public benchmark for page parsing. Its Overall score averages three parts: text accuracy (1 minus normalised edit distance), table TEDS and formula CDM, so a model strong on formulas can outrank one that is better at the tables you care about; read the component columns. Versions v1.5, v1.6 and v1.7 are not comparable, and self-reported scores differ from third-party runs: DeepSeek reports 91.09 for DeepSeek-OCR 2 on v1.5, while Baidu measured it at 89.17.
04
Scans, photos and handwriting
Born-digital PDFs and Office files carry their text; scans and phone photos need OCR. Rule-based converters such as MarkItDown return almost nothing from a scan by default. Machine-learning pipelines (Docling, Unstructured hi_res) handle printed scans, while vision-language models (PaddleOCR-VL, DeepSeek-OCR 2, hosted agentic tiers) do better on skewed, low-light or handwritten pages at higher compute cost.
05
Reading order and structure in the output
Multi-column layouts, sidebars and footnotes must come out in the order a person reads them, with headings marked as headings. Structured output, such as Docling's document model or Unstructured's typed elements, lets the next step chunk by section and filter out headers and footers. Bounding boxes and page numbers matter if you need to cite or highlight the source.
06
Where documents are processed
Hosted parsers send your files to someone else's cloud, and some use third-party model providers as subprocessors. If documents are confidential or regulated, choose a self-hosted library or model, or a vendor offering VPC or on-premises deployment. Self-hosted VLMs need a GPU; ML pipelines run on CPU but slowly.
07
Cost and throughput per 1,000 pages
Hosted prices are quoted per page and vary by mode: LlamaParse runs from $1.25 to $56.25 per 1,000 pages by tier, and Reducto charges $10 to parse and $40 for deep extraction. Self-hosted tools cost GPU or CPU time instead. Route only the hard documents to expensive modes; a fast parser is fine for clean, born-digital files.
08
Security on untrusted files
Parsers open complex, attacker-controllable formats. Docling published nine security advisories in October 2026, several allowing a crafted document to read local files, and MarkItDown's README warns that it reads files and URLs with the process's privileges. Pin patched versions and sandbox parsing if users can upload documents.
Which approach for which data
Different content needs different models. Many systems use more than one and route by data type.
| Your data | Approach | Start with |
|---|---|---|
| Born-digital PDFs and Word files | The text layer is already there, so a layout-aware open-source parser is enough; it recovers headings, reading order and tables without OCR. | Docling, MarkItDown, Unstructured |
| Scans, photos and handwriting | Needs OCR. A compact document VLM handles skewed, low-light and dense pages best; hosted agentic tiers are the alternative if you have no GPU. Check handwriting on your own samples, as published benchmarks cover it thinly. | PaddleOCR-VL-1.6, Unlimited-OCR, LlamaParse, Reducto |
| Complex tables | Use a parser with a dedicated table-structure model and compare TEDS on your own tables; keep tables as Markdown or HTML so the chunker can repeat header rows. | Docling, LlamaParse, Reducto, PaddleOCR-VL-1.6 |
| Slides | Convert PPTX directly to keep slide titles and speaker notes; for image-heavy decks, embed slide images with a multimodal model as well (see the embeddings guide). | MarkItDown, Docling |
| Spreadsheets | Convert sheets to Markdown tables for retrieval, but answer numeric questions by querying the original data rather than from embedded text. | MarkItDown, Docling, Unstructured |
| Web pages | Use a crawler that returns clean Markdown (see the ingestion guide); for saved HTML files, a parser with HTML support keeps headings and lists. | Firecrawl, Unstructured, Docling |
How the options differ
There are three families. Rule-based converters (MarkItDown, Unstructured's fast strategy) read the text layer and structure that a file already contains; they are fast and light but lose tables and reading order on complex PDFs and do nothing for scans. Machine-learning pipelines (Docling, Unstructured hi_res) add layout detection, table-structure models and OCR, and output structured documents you can chunk by section; they run on your own hardware.
Vision-language models (PaddleOCR-VL-1.6, DeepSeek-OCR 2, Unlimited-OCR) read the page as an image and write out text, tables and formulas, which handles scans and odd layouts best but needs a GPU and careful evaluation. Hosted parsers (LlamaParse, Reducto) package these approaches behind an API with per-page pricing, adding extraction to a schema, citations and support, at the cost of sending documents off-premises.
8 tools, compared
Ranked by our rating. Open any review for sources, prices and the full verdict.
| Tool | Rating | Our verdict | Best for | Price |
|---|---|---|---|---|
| Doclingrepo | 4.5/5 | Docling is the open-source parser that gets tables right, and the one whose security releases you cannot afford to skip. | Teams building self-hosted RAG over PDFs and Office documents with complex tables. | Free and open source under the MIT license. |
| PaddleOCR-VL-1.6model | 4.4/5 | Top-of-table document parsing in under a billion parameters, as long as you accept Baidu's toolchain. | Teams extracting tables, formulas and text from varied single-page documents at scale. | Free under Apache 2.0. No first-party hosted price published. |
| Reductotool | 4.3/5 | Reducto is the parser to pay for when an extraction error costs more than the page, though most of its accuracy evidence still traces back to Reducto. | Teams extracting fields from long financial, legal or medical documents where errors are expensive. | $150 free usage; Parse $10, Extract $20, Deep Extract $40, Edit $60 per 1,000 pages; batch 20% off Parse and Extract. Growth and Enterprise custom. |
| LlamaParsetool | 4.2/5 | Cheap, predictable per-page parsing for RAG pipelines, as long as your documents are allowed to visit someone else's cloud. | Teams parsing large volumes of mixed PDFs for RAG who want low, predictable per-page costs. | Free 10K credits/month; Starter $50/month (40K credits); Pro $500/month (400K credits). $1.25 per 1,000 credits; parsing 1 to 45 credits per page by tier. |
| Unlimited-OCRmodel | 4.1/5 | Unlimited-OCR turns a whole contract into one model call, and every number behind that claim so far comes from Baidu. | Teams digitising long, multi-page documents who want whole-document passes on their own GPUs. | Free under the MIT licence. Baidu AI Cloud's hosted API is free for a limited time (200 test pages for individuals, 1,000 for businesses); paid rates not published. |
| Unstructuredrepo | 3.8/5 | Still the widest net for odd file formats, but its makers now publish the numbers showing why you would pay them instead. | Teams building ETL pipelines that ingest many document formats for RAG. | Library free under Apache 2.0. Hosted platform: 10,000 free pages, then $0.015 a page; Business plan with VPC or dedicated deployment priced on request. |
| MarkItDownrepo | 3.8/5 | MarkItDown gets Office files into a model faster than anything else open source, and flattens the PDFs that retrieval most needs kept intact. | Developers who need to feed Office documents and clean digital PDFs to a model quickly and cheaply. | Free and open source under the MIT licence. Optional Azure conversion services are billed by Microsoft. |
| DeepSeek-OCR 2model | 3.7/5 | Frugal with visual tokens and well documented in its paper, but its rivals read better and its own repository stopped moving in February. | Teams already invested in the DeepSeek-OCR stack who want a drop-in accuracy upgrade. | Free under Apache 2.0. |
Side by side
The specifications that matter for this step. Checked 2026-10-19; confirm on the vendor’s site before you commit.
| Tool | Approach | Scans / OCR | Tables | Output | Hosting | Licence |
|---|---|---|---|---|---|---|
| Docling | ML pipeline; optional VLM mode | Yes (OCR); weak on handwriting | TableFormer model | Markdown, JSON document model | Self-host | MIT |
| PaddleOCR-VL-1.6 | 0.9B vision-language model | Yes, incl. warped and photos | Yes, plus formulas and charts | Markdown, JSON | Self-host (GPU) | Apache 2.0 |
| Reducto | Hosted multi-pass models | Yes | Strong (vendor-run benchmark) | JSON with citations, bounding boxes | API; VPC/on-prem (Enterprise) | Proprietary |
| LlamaParse | Tiered: text to agentic VLM | Yes (agentic tiers) | 89% in Kanopy Labs test | Markdown, structured JSON | Cloud only | Proprietary |
| Unlimited-OCR | 3B MoE VLM, multi-page passes | Yes | Yes | Not published | Self-host (GPU); Baidu Cloud | MIT |
| Unstructured | Rules (fast) or ML + OCR (hi_res) | Yes, in hi_res | 71% in Kanopy Labs test | Typed elements (JSON) | Self-host; paid API | Apache 2.0 |
| MarkItDown | Rule-based; optional LLM/Azure | No OCR by default (plugin) | Office yes; PDF tables lost | Markdown | Self-host | MIT |
| DeepSeek-OCR 2 | 3B MoE vision-language model | Yes | Yes | Markdown | Self-host (GPU) | Apache 2.0 |
Connect it to your agent
MCP servers that let assistants like Claude, ChatGPT and Cursor use these tools directly.
Where this stage fits
- Chat with your documents: we would start with Docling, LlamaParse.
- Customer support agent: we would start with MarkItDown.
- Coding agent: we would start with MarkItDown.
- Research & knowledge graph: we would start with Docling, PaddleOCR-VL-1.6.
- Assistant with long-term memory: we would start with MarkItDown.
- Image generation pipeline: we would start with Docling.
- Video production: we would start with Docling.
- Voice agent: we would start with Docling.
- Private, on-device AI: we would start with Docling, PaddleOCR-VL-1.6.
- Document processing: we would start with Reducto, PaddleOCR-VL-1.6, DeepSeek-OCR 2.
- Your own fine-tuned model: we would start with Docling.
- Workflow automation: we would start with MarkItDown.
Sources for this guide
- OmniDocBench on GitHub
- Unstructured vs LlamaParse vs Docling (Kanopy Labs)
- MarkItDown vs Docling vs Marker (danilchenko.dev)
- docling-project/docling on GitHub
- Docling October 2026 advisories (Safeguard)
- microsoft/markitdown on GitHub
- LlamaParse pricing documentation
- Reducto pricing
- PaddleOCR-VL-1.6 model card
- DeepSeek-OCR 2 model card
- Unlimited-OCR paper (arXiv)