Skip to content

Convert a PDF to Markdown

Turn a PDF into structured Markdown with headings, lists and tables inferred from the layout — ready to paste into an LLM or a docs site.

  • Runs in your browser
  • Files are never uploaded
  • Free, no account
Drop a PDF hereThe text is parsed in this tab, never uploaded.PDF · up to 500 MB each
Conversion options
Change an option and re-run to see the effect.

Runs of three or more column-aligned lines become GFM tables.

Removes the header, footer and page number that repeat on most pages.

Writes a horizontal rule between pages.

A little slower; needed to turn bold runs into **bold**. Skipped automatically past 60 pages.

A PDF does not contain paragraphs

This is the thing that makes the conversion interesting. A PDF page is a list of drawing instructions: put this glyph at this coordinate in this font at this size, then the next one. There are no paragraphs, no headings, no lists and no tables in the file — only positions. Every "PDF to Markdown" tool is therefore reconstructing structure that was never recorded, and the only honest question is how well.

Here is what this one infers, and from what:

Markdown element Inferred from
Lines Glyph runs clustered by baseline, within 40% of the local font size
Word spaces Horizontal gaps wider than about 0.28 of the font size
Paragraph breaks A vertical gap more than 1.75× the line height
Headings Font sizes more than 12% above the size that carries the most characters, ranked descending into levels 1–4
Bold The embedded font's own bold flag, or "Bold/Black/Semibold" in its name
Bullets A leading •, ‣, ▪, –, - or * followed by a space
Numbered lists A leading 1., a) or iv.
Code A line set entirely in a monospaced font
Tables Three or more consecutive lines that split into the same number of columns

Why Markdown is the right format for feeding an LLM

Language models read structure. Given a wall of undifferentiated text they will find the answer eventually; given headings, bullets and tables they follow the document's own hierarchy, which measurably improves retrieval and summarisation. Markdown is also the markup they have seen most of during training, and it is compact — no closing tags eating your context window.

The character count under the result includes a rough token estimate at four characters per token, which is close enough to tell you whether a document will fit in a given context window before you paste it.

One thing to be clear about: the conversion happens here and goes nowhere. The paste afterwards goes to whoever runs the chatbot. If the document is one you would not upload to a converter, think about that second step too.

Running heads, page numbers and other noise

Printed documents repeat things that make no sense in a Markdown file: the document title at the top of every page, a page number at the bottom, a confidentiality notice in the footer. With "strip running heads" enabled, the tool normalises the top two and bottom two lines of every page (replacing digits with a placeholder so "Page 4" and "Page 5" count as the same line), and drops anything that appears on 60 per cent or more of the pages.

Turn it off if your document is short, or if a genuinely important line happens to repeat — a recurring section label in a form, for example.

What will not convert well

  • Scans. No text layer means nothing to read. The tool says so explicitly rather than handing you an empty file. Reading pixels needs OCR, which we do not ship — the browser-sized engines are not accurate enough to be worth the false confidence.
  • Multi-column layouts. Academic papers and newspapers interleave columns in reading order that geometry alone cannot always recover. Expect lines from two columns to alternate.
  • Complex tables. Merged cells, nested headers and ragged alignment defeat the column detector. Turn table detection off if it is producing nonsense.
  • Mathematics. Equations are laid out as individually positioned glyphs, often in a symbol font. They come out as scrambled characters, not LaTeX.
  • Ligatures and hyphenation. Some PDFs encode "fi" as one glyph with no Unicode mapping, and hyphenated line breaks are rejoined only when the previous line ends in a hyphen.

Where to go instead

Questions

How are headings worked out when a PDF has no heading tags?

From the font-size distribution. The size that carries the most characters is taken as body text, and the distinct larger sizes above it become heading levels one to four, in descending order. It is geometry, not markup, because a PDF has no markup to read.

Why would I want Markdown rather than plain text?

Structure survives. Language models follow a document far better when headings, bullets and tables are marked up, and Markdown is the format they were trained hardest on. It also pastes straight into Obsidian, Notion, a static site or a pull request.

Does it work on scanned documents?

No, and it says so instead of returning an empty file. A scan has no text layer, only pixels, and reading those needs OCR. We do not ship an OCR engine because none of the browser-sized ones are good enough to be honest about.

What happens to tables?

Runs of three or more lines that split into the same number of aligned columns become GFM pipe tables. Ragged or merged-cell tables will not be recognised and come through as ordinary lines — you can turn detection off if it is guessing wrongly.

Is the document sent anywhere when I press “Copy for ChatGPT”?

No. That button only puts text on your clipboard. Pasting it into a chatbot afterwards does send it to that company, so check the document is one you are allowed to share first.