How to Convert an Image of an Equation to LaTeX
By the Datatool360 team ·
You have a formula in a screenshot, a photo of a textbook page or a scanned worksheet, and you need it as text. Retyping it in LaTeX is slow and error prone. Here is how to get a starting version from the image, how to make the picture easier to read, and how much to trust the result.
Convert an image step by step
- Open the Math PDF converter and upload the image. PNG, JPG and WebP files work. You can also upload a scanned PDF.
- Press Convert. The image is read with OCR and the equations are written as LaTeX.
- Compare the result with the picture in the live preview. Equations that were read from the picture are marked for checking.
- Correct what is wrong in the editor, and export the LaTeX, or Word with real equations.
How to take a picture that reads well
- Print or typed maths only. Handwriting is not supported.
- Take the photo straight on, with the page flat and no shadow across it.
- Fill the frame with the page, and use a resolution of at least what a phone camera gives. A tiny cropped screenshot of a long formula is hard to read.
- Use black text on a white or light background. A faint grey scan is the hardest case.
- Rotate a sideways page first. The Rotate PDF tool and the Crop PDF tool help to tidy up a scanned page.
How much to trust the result
Reading equations from a picture is the hardest job in this area. A simple formula usually comes out right, and a long one with small indexes, many fractions or unusual symbols may not. Treat the result as a starting point and check every sign, power and index against the picture. The converter marks the equations that were read from an image, so you know what to look at.
Common problems are a small letter read as a different letter, the letter l read as the digit 1, dots and commas in the wrong place, and a fraction bar read as a minus sign.
When a PDF is better than an image
If the maths is in a PDF with real text, upload the PDF and not a screenshot of it. The converter can then read the symbols from the file itself instead of guessing from the picture, and the result is usually much better.
Using the LaTeX
Paste the LaTeX between dollar signs in a LaTeX document, in a notebook or a Markdown editor that supports maths, or into the equation editor of a word processor that understands LaTeX. The guide on LaTeX basics explains the common commands, so that you can fix small errors yourself.
Keep reading
- How to Convert Maths and Equations in a PDF to LaTeXWhy maths gets garbled when you copy it from a PDF, and how to convert maths PDFs, Word files and scans to editable text with the equations kept as LaTeX.
- What Is OCR, and How Accurate Is It?What OCR (text recognition) does, why scans need it, what makes the result good or bad, and how to check OCR text before you rely on it.

