OCRRouter

Mathpix Convert vs docTR

Pick Mathpix Convert when you need math, tables or chemistry from papers and textbooks turned into LaTeX, Markdown or DOCX, and you are fine with a hosted, paid API. Pick docTR when you want a free Apache-2.0 library that runs on your own machine and returns words, lines and coordinates for your own extraction code. The main split is output: Mathpix Convert returns structured STEM documents, docTR returns text with boxes only.

Mathpix Convertmathpix/convertdocTRmindee/doctr
TypeOCR APIOpen source
Price7 credits / page1 credit / page
Per 1,000 pages$7.00$1.00
Typical speed1.5 s / page0.9 s / page
Best forMath and scientific papersWord-level OCR with positions
InputsPDF, imagesPDF, images
Languages30+ languagesMainly Latin scripts
Max pages per request500500
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ Yes✓ Yes
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

  • You need math, tables or chemistry converted to LaTeX or Mathpix Markdown, including handwritten equations.
  • You want whole PDFs exported straight to DOCX or LaTeX.
  • You prefer a hosted API with no models or GPUs to run yourself.

Choose docTR if

  • You need word-level text with coordinates, returned as nested page, block, line and word JSON.
  • You want to self-host under Apache-2.0 on CPU or NVIDIA GPU, with Docker images ready, and pay only for compute.
  • You want to pick detection and recognition architectures, use straight or rotated boxes, or train your own models in Python.

Key differences

Mathpix ConvertdocTR
LicenceProprietaryApache-2.0
How you run itHosted APIPython library on PyTorch, run locally, with Docker images (GPU images need CUDA 12.2 or newer on the host)
PricePDF $0.005 per page (0-1M), $0.0035 above 1M; images $0.002 each; one-time $19.99 API key activation feeFree, self-hosted; you pay for compute
Output formatsLaTeX, Markdown, DOCX, HTML, JSONJSON, plain text, bounding boxes
Tables and formulasConverts math, tables and chemistryNo table, formula or Markdown output; words and lines only
Best document typesMath-heavy papers and textbooks, handwritten equationsInvoices and receipts feeding custom extraction
Known failureImages with more than 12 text rows may be billed at the PDF page rateCropping images leads to poorer results (issue #2007); split-crop merging can misjoin readings across repeated characters (issue #2229)
Public benchmarkNot published on general OCR leaderboardsNot published

Sources

What each one is

Mathpix Convert

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

Mathpix Convert details

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

docTR 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": ["mindee/doctr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesdocTR alternativesBest OCR models in 2026