PDF to Markdown that keeps the structure.
Upload a PDF and get it back as Markdown: headings as headings, formulas as LaTeX, tables as rows and cells, figures as image files. Scanned PDFs work too. You read it beside the original before you download anything.
No file at hand? See a page before and after
- From
- Any PDF, scanned or digital, up to 20 MB on the free plan
- Back
- A .md file with its figures in a folder, in a zip. Word, LaTeX and Typst from the same conversion
- Cost
- A quarter of a credit a page on every plan: about 200 pages a month free
Before and after
The page, as Markdown.
Drag the handle. Left of it is the PDF page that went in; right of it is the Markdown file that came back for it, character for character.
- 01Equation 4 is LaTeX between \[ and \], with its number kept as \tag{4}.
- 02Table 2 is a table: one row per line of the original, one cell per number.
- 03Symbols inside a sentence are LaTeX too, between \( and \).

### 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.
<table><tr><td>Latent size</td><td>Baseline</td><td>Ours</td><td>Change</td></tr><tr><td>16</td><td>9.84</td><td>8.71</td><td>-1.13</td></tr><tr><td>32</td><td>7.62</td><td>6.05</td><td>-1.57</td></tr><tr><td>64</td><td>6.48</td><td>4.93</td><td>-1.55</td></tr><tr><td>128</td><td>6.31</td><td>4.88</td><td>-1.43</td></tr></table>
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 Markdown view is the file Doc2X returned for the same page on 15 November 2026, character for character. Open the PDF that went in and the Markdown file.
Why it holds together
Markdown you do not have to clean up.
The pagePDF 
\[ \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 converted.md, as downloaded 01
Formulas arrive as LaTeX
Every formula is read as a formula and written out as LaTeX: display equations between \[ and \], with the number the authors gave them, and symbols inside sentences between \( and \). Nothing is pasted in as a picture.
The pagePDF 
<table><tr><td>Latent size</td><td>Baseline</td><td>Ours</td><td>Change</td></tr> <tr><td>16</td><td>9.84</td><td>8.71</td><td>-1.13</td></tr> <tr><td>32</td><td>7.62</td><td>6.05</td><td>-1.57</td></tr> <tr><td>64</td><td>6.48</td><td>4.93</td><td>-1.55</td></tr> <tr><td>128</td><td>6.31</td><td>4.88</td><td>-1.43</td></tr> </table>The same table in converted.md, as downloaded 02
Tables arrive as tables
A table comes back as an HTML table inside the Markdown, which every Markdown renderer shows and which keeps what a pipe table cannot: merged cells and line breaks inside a cell. Each number is in its own cell.

Scanned page, nothing to select ### 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 \) :What came back for the scan: the same Markdown as for the digital page, character for character 03
Scans are read like any other page
A scanned PDF is a stack of pictures with nothing to select. Doc2X reads the print, the formulas and the tables off the image. For the sample page, the scanned copy gave the same Markdown as the digital one, character for character.
Reading order, left column first 04
Two columns, in reading order
The page is rebuilt before it is written out, so a two-column paper comes back as one stream of text in the order a person reads it, not as lines stitched across the gutter.
How it works
Three steps from PDF to Markdown.
01
Upload the PDF
Drop it into the box at the top of this page. Up to 20 MB on the free plan, 200 MB on Starter and 500 MB on Pro.
02
See what it costs, then start
The workbench counts the pages and shows the total before anything is taken: a quarter of a credit a page. The sample page took five seconds.
03
Read it, then download
The Markdown opens beside the original PDF. Copy it, or download it as a .md file with its figures; the same conversion also downloads as Word, LaTeX or Typst.
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.
- Files
- PDF, digital or scanned. A picture of a page (PNG, JPG or WebP) is taken too and goes in as a one-page PDF. A Word or PowerPoint file (.docx, .doc, .pptx, .ppt) is taken too: it is turned into a PDF first, at no cost
- File size
- 20 MB on Free, 200 MB on Starter, 500 MB on Pro
- Headings
- Markdown headings (#, ##, ###)
- Formulas
- LaTeX: \( \) inside a sentence, \[ \] on their own line, equation numbers as \tag
- Tables
- HTML tables inside the Markdown
- Figures
- Image files in an images folder, linked from the Markdown
- Download
- A zip with the .md file and its images. Word, LaTeX and Typst from the same conversion, on every plan
- Cost
- A quarter of a credit a page; the total is shown before you start. The free plan has 50 credits a month, about 200 pages. A conversion that fails is not charged.
- Storage
- Uploaded files and results are deleted automatically within 31 days
Not a fit yet
- Excel or EPUB files. Save them as PDF first.
- Pipe tables. Tables are written as HTML tables, which Markdown renderers show but some plain-text tools do not.
How do I convert a PDF to Markdown?
Upload it here and start the conversion. Doc2X rebuilds the structure of each page (reading order, headings, formulas, tables, figures) and writes it out as Markdown. You read the result next to the original PDF and download it as a .md file.
Is the PDF to Markdown converter free?
The free plan gives you 50 credits every month and needs no card. Converting a page costs a quarter of a credit, so that is about 200 pages a month. You see the total before you start, and a conversion that fails is not charged.
How are formulas written in the Markdown?
As LaTeX. A formula inside a sentence is written between \( and \), a display equation between \[ and \], and a numbered equation keeps its number as \tag. This is what Markdown editors with math support and most language models expect.
How are tables written?
As HTML tables inside the Markdown file. Markdown renderers display them, and unlike pipe tables they can hold merged cells and line breaks inside a cell.
Does it work on a scanned PDF?
Yes. Scanned pages are read with OCR that handles print, formulas and tables. There is nothing to switch on. For the sample page on this site, the scan and the digital PDF gave the same Markdown.
Is the Markdown good for feeding a language model?
That is one of the main uses. A model reads headings, LaTeX and tables far better than the text layer of a PDF, where columns run into each other and formulas turn into loose symbols. You can also ask questions about the document here: the answers come with page numbers.
What happens to the figures?
Each figure is saved as an image file. The download is a zip with the .md file and an images folder, and the Markdown links to the images by their path in that folder.
What happens to my file?
It 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 PDF into Markdown.
Start on the free plan. No card needed.