Convert a PDF to Markdown

Markdown is how you get a document into a language model, a wiki or a static site without dragging its formatting along. Plain text would be simpler, but it throws away the thing that matters most: a heading that is no longer marked as a heading is just a short line, and a table becomes a stream of numbers with nothing to attach them to. This keeps the structure and drops the appearance, which is exactly the right trade for that audience — and it runs in your browser, so an unpublished document never leaves your machine to be converted.

or drop a file anywhere on this panel

opened locally · 0 bytes sent

How it works

  1. 01Open the PDF.
  2. 02Leave table conversion on unless you want the cell text as prose.
  3. 03Leave running headers off unless you need the page furniture kept.
  4. 04Download the .md.

Structure is what survives

Headings become Markdown headings, at levels worked out from the sizes actually used in the document rather than from a fixed point size — so a report set in 9pt gets the same treatment as one set in 12. Ruled tables become Markdown tables. Paragraphs are rejoined from the lines the page broke them into, because that break belonged to the page and not to the author. Pages laid out in columns are read down each column rather than across the gutter.

Running headers and footers are left out

A document title or page number repeated on every page is useful on paper and actively harmful in a converted file: it lands in the middle of the text dozens of times, and to a model reading the result it looks like content rather than furniture. Lines that repeat in the same position across most pages are dropped, matched with their numbers ignored so that "Page 4 of 40" and "Page 5 of 40" count as the same thing. Only the margins are considered, so body text is never at risk. You can turn it off.

Why this is the format for an LLM

Feeding a PDF to a model usually means one of two bad options: sending the raw file to a service that re-hosts your document, or pasting in flat text that has lost its shape. Markdown keeps the shape in a form models are extensively trained on, costs very few tokens, and is readable enough that you can check what you are about to send. Doing the conversion in the browser means the document is not uploaded anywhere on the way.

Escaping is kept to a minimum

Characters that would change how the document parses — pipes, backticks, brackets, a line starting with a hash or a dash — are escaped. Underscores and asterisks inside words are deliberately left alone: snake_case names and 2*3 are far more common in real documents than accidental emphasis, and a file littered with backslashes is both unpleasant to read and worse as model input.

Questions

Are images included?
No — this converts the text and tables. Use the extract-images tool if you need the pictures; it gets them at full stored resolution.
What happens to a table without ruling lines?
Its text comes through as ordinary paragraphs. Only tables with visible ruling lines are converted to Markdown tables, because a table laid out with spacing has not recorded where its columns are, and guessing produces a grid that looks right and holds the wrong values.
Will it work on a scan?
No. A scanned page is a photograph with no text in it, so there is nothing to convert until it has been through OCR. The panel tells you before you download rather than handing you an empty file.
Is my document sent anywhere?
No. That is much of the point — the documents people most want to feed to a model are often the ones they least want to upload. Everything is converted by your own browser.