OCRRouter

Mathpix Convert vs Surya

Pick Mathpix Convert for math-heavy papers and textbooks where you need LaTeX or DOCX from whole PDFs, including handwritten equations. Pick Surya for local, self-hosted OCR with layout, reading order and bounding boxes across 90+ languages. The main split is a hosted per-page API against a free model you run yourself.

Mathpix Convertmathpix/convertSuryadatalab/surya
TypeOCR APIOpen source
Price7 credits / page2 credits / page
Per 1,000 pages$7.00$2.00
Typical speed1.5 s / page1.5 s / page
Best forMath and scientific papersLayout and line-level OCR
InputsPDF, imagesPDF, images
Languages30+ languages90+ languages
Max pages per request500500
Tables✓ Yes✓ Yes
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
FormsNoNo
MultilingualNo✓ Yes
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 and turns math, tables and chemistry into LaTeX and Markdown.
  • It exports DOCX and LaTeX directly from whole PDFs.
  • It is a hosted API, so you run no GPU or inference server, and it is listed as good for handwritten equations.

Choose Surya if

  • It is free to self-host (Apache-2.0 code), with no per-page fee, until you pass $5M in funding or revenue and need a commercial license.
  • It runs on your own hardware: an NVIDIA GPU with vLLM, or CPU and Apple Silicon with llama.cpp, at about 4.3-5.9 GB peak memory on an M4 Max.
  • One 689M-parameter model returns layout labels, reading order, OCR, HTML tables and KaTeX math with per-block bounding boxes, and it scores 83.7% on olmOCR-bench (authors' figure).

Key differences

Mathpix ConvertSurya
How you run itHosted APISelf-host; needs a separate vLLM or llama.cpp inference server
LicenceProprietaryCode Apache-2.0; weights under a modified AI Pubs Open Rail-M licence, free for research, personal use and companies under $5M funding or revenue
PricePDF $0.005 per page (0-1M), $0.0035 above 1M; images $0.002 each; one-time $19.99 API key activation feeFree; you pay for compute; commercial license needed above $5M
Output formatsLaTeX, Markdown, DOCX, HTML, JSONJSON, HTML, LaTeX, bounding boxes, plain text
BenchmarkNo published accuracy benchmark on general OCR leaderboards83.7% on olmOCR-bench and 85.9 on OmniParseBench (Surya 2.5, authors' figures)
HandwritingListed as good for handwritten equationsListed as not for handwriting; the README suggests the hosted Datalab API for handwriting, complex tables and math
Known failureImages with more than 12 text rows may be billed at the PDF page rate; billed monthly in arrearsSurya 2.5 table output lacks row/column geometry; only 21 of 91 languages reach 90% pass rate, and multilingual tables score 58.1

Sources

What each one is

Mathpix Convert

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

Mathpix Convert details

Surya

Open-source OCR toolkit with line detection, layout analysis, reading order and tables.

Surya 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": ["datalab/surya"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesSurya alternativesBest OCR models in 2026