ByteScope

Math OCR

Paste a screenshot of one formula, get LaTeX you can edit while the preview updates. Printed formulas were right 39 times out of 40 in our test; handwriting is untested and usually worse.

Runs in your browser. Your images are not uploaded. The model file downloads once from huggingface.co, and the ONNX Runtime script loads from cdn.jsdelivr.net.

The model

pix2text-mfr (MIT licence), a formula recogniser. It reads one formula at a time, on your device.

Running on: Checking…

Formula image

Drop a formula image here

or click to browse. You can also paste a screenshot (Ctrl+V).

LaTeX

Preview

The rendered formula appears here.

Copy as

Paste into Word to get an editable equation. Not verified on every Word version.

This visit

Formulas you recognise on this visit appear here. Nothing is saved.

Need more than one formula? Whole page of text · Scan handouts

Read this before you use it

  • One formula, or one aligned block, at a time works best. On a page with text around it, box each formula separately.
  • Handwritten formulas have not been tested yet, and they are usually much worse than printed ones. Expect to correct more.
  • In our test, 39 of 40 printed formulas (rendered with KaTeX at two sizes) came out exactly right.
  • The same rendering can come from different LaTeX, for example \frac and /. Read the source if you are matching a document.
  • Spaces inside \text{}, \mathrm{} and \operatorname{} are removed, because the model reads letters one at a time. Put word spaces back by hand.
  • Very long formulas are slow on the CPU, and anything past about 500 symbols is cut off. Box one part at a time.
  • It only transcribes the formula. It does not solve or check the mathematics.
  • Images are not uploaded. The model file (about 118 MB) is downloaded once from huggingface.co, and the ONNX Runtime script comes from cdn.jsdelivr.net.

About this tool

One formula at a time

The math OCR works best on exactly one formula or one aligned block: paste a screenshot, drop a photo, or open an image and drag a box around the equation you want. The crop is padded to a square and scaled to the model's input size, so a tight box around the formula gives better results than a whole page with text around it. A page of lecture notes is not the target — for mixed text and maths, box each formula separately. The formulas you convert during a visit are listed on the page until you close it; nothing is saved.

Edit the LaTeX with the preview open

The recognised LaTeX lands in an editable field with a KaTeX rendering next to it, and the preview re-renders as you type. A parse error shows in the preview area rather than blanking it, so a missing brace is visible immediately. The page also tidies the model's output — collapsing stray spaces, turning \operatorname { s i n } back into \sin — and warns when braces do not balance. Spaces inside \text{…}, \mathrm{…} and \operatorname{…} are removed too, because the model spells letters one at a time and the page cannot tell where a word space was, so put those back by hand. Then copy it in the form you need: raw LaTeX for a document, $…$ for inline maths in Markdown or a Jupyter cell, $$…$$ for a display equation, or MathML for pasting into a word processor.

How accurate the image to LaTeX conversion is

The model is pix2text-mfr, an open-source formula recogniser under the MIT licence, about 118 MB downloaded once from huggingface.co and then cached by the browser, while the ONNX Runtime script that runs it loads from cdn.jsdelivr.net. We rendered 20 printed formulas with KaTeX at two sizes and ran all 40 through it; 39 came back exactly right. That test covers clean printed input only. Handwritten formulas have not been tested here yet, and formula recognisers are usually much worse on handwriting, so expect to correct more. Low-resolution screenshots and photos taken at an angle also lower the odds; a larger, straighter crop helps.

Same rendering, different LaTeX

A formula that renders identically can be written several ways: \frac{a}{b} and a/b, \left( and plain (, x^{2} and x^2. The recogniser returns the markup it thinks matches the picture, which may not be the markup the source used. If you are matching an existing document, read the LaTeX as well as the preview. And this is a transcription tool only — it turns the image into markup and does not simplify, solve or check the mathematics.

When a paid service is overkill

Paid services such as Mathpix do the same conversion with extra features on top. For the occasional screenshot in a paper, a homework write-up or a slide, this page covers the common case with no account and no upload: your images stay in the browser, the model runs on your GPU through WebGPU when the browser has one or on the CPU when it does not, and the result is the same either way. For a whole scanned document you want the OCR tool for text and this one for the formulas you box out of it.

Frequently asked questions

Does it read handwritten formulas?

It will try, but we have not measured it, and formula recognisers are usually much worse on handwriting than on print. Our 39-of-40 figure is for printed formulas rendered by KaTeX. Expect to fix more of the LaTeX on handwriting, and use the live preview to check it.

Can it convert a whole page of notes?

Not in one go. The model is built for a single formula or one aligned block, and surrounding text confuses it. Open the page image and box each formula you want; the page crops, pads and recognises the selection. For the text parts of the page, use the OCR tool instead.

How do I paste the result into Word?

Copy as MathML and paste into Word, which turns MathML into an editable equation. We have not verified this on every Word version or on other word processors, so check the equation after pasting; if it arrives as plain text, use Word's own LaTeX input mode with the raw LaTeX instead.

Which formats can I copy?

Four: the raw LaTeX, $…$ for inline maths, $$…$$ for a display equation, and MathML. The first three paste into LaTeX documents, Markdown, Obsidian or Jupyter; MathML is for Word and other editors that accept it.

Does it solve the equation?

No. It transcribes the picture into LaTeX markup and nothing more — it does not simplify, evaluate or check the mathematics. Paste the LaTeX into a computer algebra system if you need the answer.

How big is the download, and is my image uploaded?

About 118 MB, fetched once from huggingface.co and then kept in the browser's cache, plus the ONNX Runtime script from cdn.jsdelivr.net; the page shows whether the model is already downloaded. Your images are never uploaded — recognition runs in your browser, on the GPU through WebGPU when available and on the CPU otherwise, and the output is identical either way.

Why doesn't the LaTeX match the original source?

Because many LaTeX spellings produce the same picture. The model sees only the rendering, so it may return \frac{a}{b} where the author wrote a/b, or x^{2} for x^2. The preview tells you whether it looks right; the markup is yours to adjust.