Image to LaTeX, free: 6 tools on 40 formulas
38
of 40 formulas right, PP-FormulaNet_plus-M
PP-FormulaNet_plus-M got 38 of 40
I drew 40 formulas from LaTeX I typed, so the right answer is known. Each tool read each image on a Mac CPU.
| Tool | Right | Time |
|---|---|---|
| PP-FormulaNet_plus-M (PaddleOCR 3.7) | 38 | 1.7 s |
| PP-FormulaNet_plus-L | 37 | 10.5 s |
| PP-FormulaNet_plus-S | 34 | 0.5 s |
| Pix2Text 1.1.7, formula model | 34 | 3.9 s |
| pix2tex 0.1.4, three runs | 29 to 31 | 0.5 to 0.6 s |
| Tesseract 5.5.4 | 0 | 0.1 s |
How I tested and scored
- 40 well-known formulas: the quadratic formula, Bayes, Maxwell, Stirling, matrices, cases and more. MathJax 3.2.1 drew each one black on white, 32 to 129 px tall, with a 12 px margin.
-
Right means the same LaTeX once spaces, braces,
\left,\right,\bigand thin spaces are ignored,\cfraccounts as\frac, and\operatorname{s i n}as\sin. MathJax drawing the exact same pixels also counts. - One tool at a time on an Apple silicon Mac, CPU only, set to 2 threads. Time is the mean a formula after the model loaded.
- These are clean images. Scans and phone photos will likely score lower.
Run it in 5 lines of Python
Install PaddlePaddle and PaddleOCR with the
doc-parser extra:
pip install paddlepaddle "paddleocr[doc-parser]"
Save this as latex.py:
import sys
from paddleocr import FormulaRecognition
model = FormulaRecognition(model_name="PP-FormulaNet_plus-M")
for res in model.predict(input=sys.argv[1], batch_size=1):
print(res["rec_formula"].rstrip(".,"))
Run python3 latex.py formula.png. The first run downloads
about 600 MB. Crop to one formula an image.
Both misses: a comma it added
The two formulas M got wrong were right, plus a comma at the end. The script strips a final comma or period, and then M got 40 of 40.
S and L do it too. S added a period or comma to 3 formulas, and L to 2.
pip install paddleocr alone fails
Without the extra, the model downloads and then stops with:
DependencyError: `UniMERNetDecode` is not ready for use, because the following dependencies are not available:
tokenizers
The doc-parser extra installs tokenizers,
and the same script runs.
pix2tex is fast, but it guesses
pix2tex samples each answer, so the same image can come back different. Three runs of the same 40 got 29 to 31 right.
Small images went wrong more often: 4 of the 10 smallest. E =
mc² came back as
P\underline{{{\eta}}}\underline{{{\rightarrow}}}\gamma p
v^{2}. Physics did not change that day.
One more trap: from Python, LatexOCR() copies every
answer to your clipboard. My first run did that 40 times. Turn it off
first:
import pix2tex.cli
pix2tex.cli.clipboard.copy = lambda *a: None
Pix2Text: right, but wrapped
Pix2Text wrapped 3 right answers in extra aligned blocks,
and wrote one limit with \underset. Read as right, it got
38.
It was slower than every model but L, and its ONNX step used about 3 cores even when set to 2.
Tesseract and our Actor skip the math
Tesseract got 0 of 40. Our Actor's code read a page of 4 formulas as plain text. The quadratic formula came out as:
x =
−h + /h2 − 4αc VU ONI
2a
The Actor is for the words around the math, not the math.
Scanned pages to text, no install
Run it yourself. Our Apify Actor turns a scanned PDF into Markdown or text. $0.006 a scanned page. It writes no LaTeX.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.
Questions people ask
Is there a free Mathpix alternative?
Yes, for clean images. PP-FormulaNet_plus-M got 38 of 40 here, free and offline. Mathpix Snip's free plan reads 10 images a month, says its pricing page on November 17, 2026.
What are the licenses?
pix2tex is MIT. Pix2Text is MIT, but its install pulls in PyMuPDF and doclayout-yolo, which are AGPL. The PP-FormulaNet_plus models and PaddleOCR are Apache-2.0.
Can it read a whole PDF page?
Not alone. These models read one cropped formula. For full pages, PP-StructureV3 finds the formulas first, and MinerU 4.0 uses PP-FormulaNet plus-M too.
Does it need a GPU?
No. Every run here was CPU only. The L model took 10.5 s a formula, and M took 1.7 s.
Did you test handwritten math?
No. All 40 images are clean typeset formulas. Scans, phone photos and handwriting will likely score lower, and I did not measure it.