Skip to content
Doc2X

Image to LaTeX from a screenshot or a scan.

Add a picture of a formula, or of a whole page, and get a .tex file back: every equation as LaTeX math you can edit, tables as tabular, the text as text. A screenshot of one equation and a picture of a scanned page were both read for this page; what came back for each is further down.

Convert a picture

Turn it into

You read it as Markdown beside the PDF first. The other formats stay one click away.

Free plan: about 200 pages every month, no card needed.

No file at hand? See a page before and after

From
A PNG, JPG, WebP, GIF or BMP picture, up to 20 MB
Back
A .tex file in a zip. Markdown, Word and Typst from the same conversion
Cost
A quarter of a credit a picture: about 200 a month on the free plan

Before and after

The picture, as LaTeX.

Drag the handle. Left of it is the picture that went in: a JPG of a page, grey, soft and slightly askew, the way a scan is. Right of it is the body of the .tex file that came back for it, character for character.

  • 01Equation 4 is display math, with its number kept as \tag{4}.
  • 02Table 2 is a tabular: four columns, five rows, every number in its cell.
  • 03The PDF of the same page gave the same file, character for character.
Original pictureconverted.tex
A scanned page of a research paper in English: grey, soft and slightly askew, with nothing to select.
\section*{3.2 Variational objective}

We train the encoder \({q}_{\phi }\left( {z \mid  x}\right)\) and the decoder \({p}_{\theta }\left( {x \mid  z}\right)\) jointly by maximising the evidence lower bound on the marginal log-likelihood of each observation \(x\) :

\[
\mathcal{L}\left( {\theta ,\phi ;x}\right)  = {\mathbb{E}}_{{q}_{\phi }\left( {z \mid  x}\right) }\left\lbrack  {\log {p}_{\theta }\left( {x \mid  z}\right) }\right\rbrack   - {D}_{\mathrm{KL}}\left( {{q}_{\phi }\left( {z \mid  x}\right) \parallel p\left( z\right) }\right) .\tag{4}
\]

The first term rewards faithful reconstruction; the second keeps the approximate posterior close to the prior \(p\left( z\right)  = \mathcal{N}\left( {0,I}\right)\) . Table 2 reports the error for four latent sizes.

Table 2: Mean squared reconstruction error on the held-out split, in thousandths.

\begin{center}
\adjustbox{max width=\textwidth}{
\begin{tabular}{|c|c|c|c|}
\hline
Latent size & Baseline & Ours & Change \\
\cline{1-4}
16 & 9.84 & 8.71 & -1.13 \\
\cline{1-4}
32 & 7.62 & 6.05 & -1.57 \\
\cline{1-4}
64 & 6.48 & 4.93 & -1.55 \\
\cline{1-4}
128 & 6.31 & 4.88 & -1.43 \\
\cline{1-4}
\hline
\end{tabular}
}
\end{center}

Increasing \(d\) beyond 64 yields diminishing returns, which is consistent with the capacity analysis in Section 5. We therefore fix \(d = {64}\) in all remaining experiments.

Not a mock-up. The LaTeX view is the file Doc2X returned for this picture on 18 November 2026, character for character (of the LaTeX file, the part after the preamble). Open the picture that went in and the LaTeX file.

Why it works on pictures

A picture is enough.

  1. A screenshotPNG · 1090 × 104
    A screenshot of one numbered equation from a paper: the evidence lower bound, equation 4.
    \[
    \mathcal{L}\left( {\theta ,\phi ;x}\right)  = {\mathbb{E}}_{{q}_{\phi }\left( {z \mid  x}\right) }\left\lbrack  {\log {p}_{\theta }\left( {x \mid  z}\right) }\right\rbrack   - {D}_{\mathrm{KL}}\left( {{q}_{\phi }\left( {z \mid  x}\right) \parallel p\left( z\right) }\right) .\tag{4}
    \]
    The body of the .tex file that came back for it, as downloaded

    01

    One formula in, its LaTeX out

    A screenshot of a single equation is all it needs. The one shown here is 1090 by 104 pixels. It came back as display math with its number as \tag{4}, inside a .tex file that is a complete document.

  2. The pictureJPG
    A results table with its caption, in the picture that was uploaded.
    \begin{tabular}{|c|c|c|c|}
    \hline
    Latent size & Baseline & Ours & Change \\
    \cline{1-4}
    16 & 9.84 & 8.71 & -1.13 \\
    \cline{1-4}
    32 & 7.62 & 6.05 & -1.57 \\
    \cline{1-4}
    64 & 6.48 & 4.93 & -1.55 \\
    \cline{1-4}
    128 & 6.31 & 4.88 & -1.43 \\
    \cline{1-4}
    \hline
    \end{tabular}
    The same table in the .tex file that came back for the picture, as downloaded

    02

    A whole page comes back whole

    From a picture of a page you get the page: the heading as a section, the symbols inside sentences as inline math, the table as a tabular with one cell per value.

  3. The pictureJPG
    A numbered equation and the sentence that introduces it, in the picture that was uploaded.
    \[
    \mathcal{L}\left( {\theta ,\phi ;x}\right)  = {\mathbb{E}}_{{q}_{\phi }\left( {z \mid  x}\right) }\left\lbrack  {\log {p}_{\theta }\left( {x \mid  z}\right) }\right\rbrack   - {D}_{\mathrm{KL}}\left( {{q}_{\phi }\left( {z \mid  x}\right) \parallel p\left( z\right) }\right) .\tag{4}
    \]
    The same equation in the .tex file that came back for the picture, as downloaded

    03

    The same file as from the PDF

    The picture on this page was made from a PDF that we converted too. Both gave the same .tex file, character for character: the grey background, the soft focus and the slight tilt of the picture did not change a symbol.

  4. 04

    Four formats from one picture

    The same conversion also gives Markdown with the math in LaTeX, a Word file with Word equations, and Typst. All four are downloads of the one quarter credit.

How it works

Three steps from picture to .tex.

  1. 01

    Add the picture

    Drop it into the box at the top of this page: a PNG, JPG, WebP, GIF or BMP, up to 20 MB. Your browser puts it into a one-page PDF; nothing is uploaded before you start.

  2. 02

    See what it costs, then start

    The workbench shows the total before anything is taken: a quarter of a credit for the picture. From the click on Convert to the open result, the screenshot on this page took 15 seconds and the picture of the page 19.

  3. 03

    Copy a formula, or download the file

    The result opens as text with the formulas typeset. Click a formula and choose LaTeX to copy just that one, or download the .tex file: the dialog opens on LaTeX when you come from this page.

The fine print

What it takes and what it gives back.

Better to know before you upload. The last list is what it does not do today.

Pictures
PNG, JPG, WebP, GIF or BMP: a screenshot, or a page saved as a picture
File size
Up to 20 MB a picture
How it travels
Your browser puts the picture into a one-page PDF; from there it is converted like any PDF
Equations
Inline math \( \), display math \[ \], equation numbers as \tag
Tables
tabular; the preamble loads multirow, booktabs and tabularx
Document
A complete .tex file: article class, preamble and body
Compiler
XeLaTeX or LuaLaTeX (the preamble loads fontspec and unicode-math)
Several pictures
In the workbench you can choose up to 30 pictures at once: they become one document, a page each, in the order of their names
Download
A zip with the .tex file. Word, Markdown and Typst from the same conversion, on every plan
Cost
A quarter of a credit a picture; the total is shown before you start. The free plan has 50 credits a month, about 200 pictures. A conversion that fails is not charged.
Storage
Uploaded files and results are deleted automatically within 31 days

Not a fit yet

  • Photos of handwriting. We have not measured them, so this page does not promise them. A formula you write on the pad of the Snip page in the app is read; check what comes back.
  • Photos taken at an angle or in poor light. The pictures behind this page are flat and sharp enough to read; we have not measured worse ones.
  • Diagrams as code. A figure in the picture comes back as an image file, not as TikZ.
  • pdfLaTeX without changes: the preamble is written for XeLaTeX and LuaLaTeX.

Questions

Questions people ask first.

Something else on your mind? The help center goes deeper.

How do I convert an image to LaTeX?

Add the picture to the box on this page and start the conversion. Doc2X reads what is in it, writes the equations, the tables and the text out as LaTeX, and gives you a .tex file. You look at the result before you download it.

Can it read a screenshot of a single equation?

Yes. The screenshot on this page is one equation, 1090 by 104 pixels. It came back as display math with its equation number, 15 seconds after the click on Convert. The .tex file is on this page to download.

Does it work on a picture of a whole page?

Yes. A picture of a page comes back as the page: headings, sentences with inline math, numbered equations and tables. For the page shown here, the picture and the PDF it was made from gave the same .tex file, character for character.

Does it read handwriting?

We have not measured photos of handwriting, so we do not promise them here. What is checked: a formula you write by hand on the pad of the Snip page in the app is read into LaTeX. Compare the result with what you wrote.

Is it free?

The free plan gives you 50 credits every month and needs no card. A picture costs a quarter of a credit, so about 200 pictures a month. The total is shown before you start, and a conversion that fails is not charged.

Can I copy just the LaTeX of one formula?

Yes. In the result, click any formula and choose LaTeX: that formula is on your clipboard. You do not have to download the file for it.

Which picture formats does it take?

PNG, JPG, WebP, GIF and BMP, up to 20 MB each. The same box takes a PDF, digital or scanned, if that is what you have.

What happens to my picture?

Your browser puts it into a PDF. When you start, that PDF is uploaded over an encrypted connection, used to produce your conversion, and deleted automatically within 31 days. Unless you explicitly agree, your files are not used to train AI models offered to the public or to other customers.

Turn the picture into source.

Start on the free plan. No card needed.