Snip Snipping Tool Chrome Extension OCR API Files API Private Cloud OCR Secure Conversion Service
Make Documents Accessible Process Chemical Documents Collaborate on Documents OCR API for Developers Train Language Models Support Academic Research Artificial Intelligence Fintech Edtech Pharma & Chemical Universities & Schools
Handwriting Recognition Digital Ink On-prem PDF Cloud Mathpix Markdown All Supported Languages Image Conversion PDF Conversion Markdown Conversion Table OCR Mathpix CLI PDF Search PDF Reader PDF Data Extraction Chrome Extension View Conversion Gallery
Snip APIs Private Cloud OCR SCS
Mobile Desktop Web Chrome Extension
Mathpix Snip Apps Mathpix OCR API Mathpix Markdown Python SDK
Blog
About Careers Contact
Contact Get Started

Convert Image to LaTeX

LaTeX OCR is math recognition named for its output: you get LaTeX source you can compile and edit, not a picture of an equation.

  • LaTeX source out, from an image or a whole paper
  • Theorem environments and aligned blocks preserved
  • Opens directly in Overleaf
  • Figures extracted alongside the source

What LaTeX OCR gives you that an image does not

Recognition is only useful if the output is something you can work with. That is the whole distinction the term is drawing.

Source, not a screenshot

The point of the term is the output. A picture of an equation cannot be edited, searched, diffed or compiled; LaTeX can be all four.

Structure as well as symbols

Theorem, lemma and proof environments, aligned blocks and algorithm listings each come back as themselves rather than as bold paragraphs.

One equation or the whole paper

The image endpoints take a single snip; the PDF endpoint takes a document up to 1 GB and returns a .tex with its figures.

What survives the conversion to LaTeX

Theorem environments are preserved

Theorems, lemmas, corollaries and proofs are a documented Mathpix Markdown structure and export as LaTeX environments.

Algorithm blocks keep their shape

include_line_data returns code and pseudocode line types, so a listing is not reflowed into prose.

Multi-column pages read in order

The PDF endpoint applies document-layout recognition automatically, so a two-column journal page comes back in reading order.

How to convert Image to LaTeX

1

Upload your Image

Drag it into the Mathpix Snip web editor, or pick it from your files.

2

Convert it to LaTeX

Recognition runs on the whole document: math, tables, figures and layout together.

3

Export or copy the LaTeX

Download the LaTeX, or copy it straight to the clipboard and paste it where you need it.

What Mathpix accepts, and the limits that apply

Which files you can send

JPEG, PNG, BMP, JPEG 2000, WebP, TIFF, PBM, PGM, PPM, PNM, PFM, Sun raster, OpenEXR and Radiance HDR, and documents through the PDF endpoint at up to 1 GB

What you get back

LaTeX, as a .tex file or a zip carrying the figures, and openable directly in Overleaf.

The size limits that apply

v3/text or v3/latex JSON request body: 5 MB

Image fetched from a URL (15s timeout): 10 MB

v3/strokes JSON request body: 512 KB

Converting Image to LaTeX: common questions

What does LaTeX OCR mean?

Recognition of mathematical content where the output is LaTeX source. The same recognition is also called math OCR; this name describes what you get back rather than what you put in.

What about the open-source projects?

pix2tex, Nougat, Texify and Marker are the ones the search term is mostly held by, and they are worth trying. We are not publishing a benchmark table we cannot reproduce ourselves. The difference worth stating plainly is scope: handwriting, tables, chemistry and document layout in one supported API, rather than equations alone.

Will the LaTeX compile as it comes?

Usually. Where it does not, the cause is almost always a package the original document assumed rather than the recognised body, so the preamble is the part to check first.

Can it do a whole paper, not just an equation?

Yes, through the PDF endpoint, which returns the .tex with its figures extracted and referenced.

Other formats you can convert Image to

Math OCR, named for its input

The same recognition, described by what it reads.

A whole PDF, out as LaTeX

The document workflow, with figures.

Straight into an Overleaf project

No download and re-upload.