OCRRouter

Mathpix Convert vs Tesseract.js

Pick Mathpix Convert for math-heavy papers, textbooks and handwritten equations, or when you need whole PDFs turned into LaTeX or DOCX. Pick Tesseract.js for free, in-browser OCR of clean printed text where images must stay on the user's device. The main split is STEM and PDF conversion as a paid hosted API versus plain-text OCR in a free client-side library.

Mathpix Convertmathpix/convertTesseract.jstesseract/tesseract-js
TypeOCR APIOpen source
Price7 credits / page1 credit / page
Per 1,000 pages$7.00$1.00
Typical speed1.5 s / page2.0 s / page
Best forMath and scientific papersOCR in the browser
InputsPDF, imagesimages
Languages30+ languages100+ languages
Max pages per request500500
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ Yes✓ Yes
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

  • You need math, tables or chemistry from papers and textbooks as LaTeX or Mathpix Markdown.
  • You need to convert whole PDFs straight to DOCX or LaTeX, which Tesseract.js cannot read as input.
  • You have handwritten equations, which Tesseract.js is not suited for.

Choose Tesseract.js if

  • You need OCR to run fully in the browser or Node.js so images never leave the user's device.
  • You want a free Apache-2.0 library with no per-page or per-image cost, installed from npm, ESM or a CDN script tag.
  • Your input is simple printed text in one of more than 100 supported languages, such as clean screenshots or scans.

Key differences

Mathpix ConvertTesseract.js
How you run itHosted APILibrary that runs in the browser or Node.js
LicenceProprietaryApache-2.0
PricePDF $0.005 per page (0-1M), $0.0035 above 1M; images $0.002 each; one-time $19.99 API key feeFree, self-hosted
Output formatsLaTeX, Markdown, DOCX, HTML, JSONPlain text, hOCR, bounding boxes
PDF inputConverts whole PDFs directlyDoes not accept PDF files; the README points to Scribe.js
Handwriting and tablesGood for handwritten equations; tables and chemistry to LaTeX and MarkdownNot suited for handwriting, tables or layout
Known issues$19.99 non-refundable fee; images with more than 12 text rows may be billed at the PDF page rate; billed monthly in arrearsReports of lower accuracy than the Tesseract CLI; fails on screen resolution text unless images are upscaled; one Electron user measured about 15 s per page versus 1.5 s with the CLI

Sources

What each one is

Mathpix Convert

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

Mathpix Convert details

Tesseract.js

Tesseract compiled to JavaScript and WebAssembly, so OCR runs in the browser or in Node.js.

Tesseract.js 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": ["tesseract/tesseract-js"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesTesseract.js alternativesBest OCR models in 2026