OCRRouter

Mathpix Convert vs Docling

Pick Mathpix Convert when the job is math-heavy papers, textbooks or handwritten equations that must come out as LaTeX or DOCX, and you accept a hosted API with per-page billing. Pick Docling when you want a free, MIT-licensed library that runs on your own machine and turns born-digital PDFs and Office files into structured JSON for RAG. The main split is hosted STEM conversion versus self-hosted general ingestion.

Mathpix Convertmathpix/convertDoclingibm/docling
TypeOCR APIOpen source
Price7 credits / page2 credits / page
Per 1,000 pages$7.00$2.00
Typical speed1.5 s / page2.2 s / page
Best forMath and scientific papersStructured export for RAG
InputsPDF, imagesPDF, images, DOCX
Languages30+ languagesLatin scripts, CJK
Max pages per request500500
Tables✓ Yes✓ Yes
Handwriting✓ YesNo
Math✓ Yes✓ Yes
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
FormsNoNo
MultilingualNoNo
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose Mathpix Convert if

  • It is built for STEM content: math, tables and chemistry become LaTeX and Markdown.
  • It exports whole PDFs straight to DOCX or LaTeX.
  • It handles handwritten equations, which are listed among its good uses.

Choose Docling if

  • It is MIT licensed and free to self-host, so you only pay for compute.
  • One API parses PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL.
  • Lossless JSON export keeps layout, reading order and table structure for downstream tools.

Key differences

Mathpix ConvertDocling
How you run itHosted APIPython library that runs locally on macOS, Linux and Windows; CPU works, GPU speeds up model stages
LicenceProprietaryMIT (individual models have their own licenses)
PricePDF $0.005 per page up to 1M pages, then $0.0035; images $0.002 each; one-time $19.99 API key activation feeFree, self-hosted (you pay for compute)
Output formatsLaTeX, Markdown, DOCX, HTML, JSONMarkdown, HTML, JSON, DocTags, plain text
Input typesImages and PDFs with math, tables and chemistryPDFs, Office files, HTML, EPUB, images, emails and XBRL
BenchmarksNot published on general OCR leaderboardsNot published
Known failureImages with more than 12 text rows may be billed at the PDF page rateOCR regression in 2.143.1 drops words and numbers with full-page Tesseract OCR (issue #5254); reading order can merge neighbouring columns (issue #5132)

Sources

What each one is

Mathpix Convert

Specialist for math, science papers and handwritten formulas. Outputs LaTeX.

Mathpix Convert details

Docling

IBM's open-source document converter with a structured document model.

Docling details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "mathpix/convert","fallbacks": ["ibm/docling"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesDocling alternativesBest OCR models in 2026