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/convert | TrOCRmicrosoft/trocr | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 7 credits / page | 1 credit / page |
| Per 1,000 pages | $7.00 | $1.00 |
| Typical speed | 1.5 s / page | 1.2 s / page |
| Best for | Math and scientific papers | Handwritten text lines |
| Inputs | PDF, images | images |
| Languages | 30+ languages | English |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | ✓ Yes |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| Multilingual | No | No |
| On OCRRouter | Available | Available |
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 Convert | TrOCR | |
|---|---|---|
| How you run it | Hosted API | Library, run locally through Hugging Face transformers |
| Licence | Proprietary | MIT (microsoft/unilm repository) |
| Price | PDF $0.005 per page (0-1M), $0.0035 above 1M; images $0.002 each; one-time $19.99 API key activation fee | Free, self-hosted; you pay for compute |
| Input scope | Images and whole PDFs with math, tables and chemistry | Single text-line images only; you need a separate line detector |
| Output formats | LaTeX, Markdown, DOCX, HTML, JSON | Plain text |
| Published benchmark | No published accuracy benchmark on general OCR leaderboards | 2.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 arrears | English-focused checkpoints; no layout or table output; up to 558M parameters (large), slow on CPU versus CRNN recognizers |
Sources
- Mathpix billing docs
- Mathpix PDF price reduction
- Mathpix OCR API
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- microsoft/unilm repository
What each one is
Mathpix Convert
Specialist for math, science papers and handwritten formulas. Outputs LaTeX.
Mathpix Convert detailsTrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR detailsTry both on your own file
Run the file once with each model and compare the output.
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