OCRRouter

Mathpix Convert vs TrOCR

Pick Mathpix Convert when you need whole PDFs or page images with math, tables or chemistry turned into LaTeX, Markdown or DOCX. Pick TrOCR when you already have cropped single-line images, mostly English handwriting or receipt lines, and want a free MIT-licensed recognizer you run and fine-tune yourself. The main split is scope: Mathpix handles full documents through a paid API, TrOCR reads one text line at a time and leaves detection and layout to you.

Mathpix Convertmathpix/convertTrOCRmicrosoft/trocr
TypeOCR APIOpen source
Price7 credits / page1 credit / page
Per 1,000 pages$7.00$1.00
Typical speed1.5 s / page1.2 s / page
Best forMath and scientific papersHandwritten text lines
InputsPDF, imagesimages
Languages30+ languagesEnglish
Max pages per request500100
Tables✓ YesNo
Handwriting✓ Yes✓ Yes
Math✓ YesNo
Bounding boxes✓ YesNo
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

  • You need LaTeX, Markdown, DOCX or HTML output from math-heavy papers and textbooks, including handwritten equations.
  • You want to send whole PDFs and get a DOCX or LaTeX file back, with tables and chemistry handled.
  • You prefer a hosted API with no model to run, at $0.005 per PDF page up to 1M pages and $0.002 per image.

Choose TrOCR if

  • You want a free, MIT-licensed model you run yourself through Hugging Face transformers, paying only for compute.
  • You need English handwritten, printed (SROIE) or scene text line recognition, with separate checkpoints for each.
  • You plan to fine-tune a recognizer on your own line images, or you want the IAM result of 2.89 character error rate that the paper reports for the large model.

Key differences

Mathpix ConvertTrOCR
How you run itHosted APILibrary, run locally through Hugging Face transformers
LicenceProprietaryMIT (microsoft/unilm repository)
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
Input scopeImages and whole PDFs with math, tables and chemistrySingle text-line images only; you need a separate line detector
Output formatsLaTeX, Markdown, DOCX, HTML, JSONPlain text
Published benchmarkNo published accuracy benchmark on general OCR leaderboards2.89 CER on IAM handwriting with TrOCR-large, reported by the authors
Known limits$19.99 non-refundable fee; images with more than 12 text rows may be billed at the PDF page rate; billed monthly in arrearsEnglish-focused checkpoints; no layout or table output; up to 558M parameters (large), slow on CPU versus CRNN recognizers

Sources

What each one is

Mathpix Convert

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

Mathpix Convert details

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR 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": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesTrOCR alternativesBest OCR models in 2026