PDF to Markdown: how it works and what it preserves
A PDF stores glyphs at coordinates. It does not store a heading, a list, or a table, so everything structural has to be inferred back out of that geometry. This page explains how that inference works, what survives it, and the documents where it fails.
Drop your PDF or Word file here
or choose a file from your computer
PDF or Word (.docx) · up to 50 MB
How does a converter turn a PDF back into headings and lists?
It measures the most common font height in the document, treats that as the body text baseline, and classifies everything relative to it. Larger runs become headings; bullet glyphs and indent depth become nested lists.
What does PDF to Markdown conversion lose?
Merged table cells, images, annotations and page furniture have no Markdown equivalent. A scan contains no selectable text at all, so it needs the separate scanned PDF converter, which recognises the words on our server.
How to convert a PDF to Markdown
- 1
Open the converter
Go to mypdf2md.com. Nothing to install and no account to create.
- 2
Add your PDF
Drag the file onto the drop zone, or click to pick it from your computer. Files up to 50 MB are accepted.
- 3
Review the Markdown
The converted Markdown appears alongside a live preview. Edit it directly if a heading or table needs a nudge.
- 4
Copy or download
Copy the Markdown to your clipboard, or download it as a .md file ready for your editor or repository.
What the converter reconstructs
A PDF does not store a heading, a list, or a table. It stores glyphs at coordinates on a page. Everything structural has to be inferred back out of that geometry, which is why so many PDF-to-text tools return an undifferentiated wall of text.
This converter measures the most common font height in your document and treats it as the body text baseline, then classifies everything relative to it.
- Headings, from font size relative to body text, mapped to H1 through H4
- Paragraphs, by merging lines whose vertical gap is small enough to be line spacing rather than a break
- Bulleted and numbered lists, including nesting inferred from indent depth
- Tables, where cells align on the same columns across consecutive rows, rendered as GFM pipe tables
- Bold, italic and monospace runs, from the font each glyph is set in
- Two-column layouts, read left column fully before right, rather than interleaved line by line
What it cannot do
Scanned documents contain no selectable text, only an image of text. This converter reads a PDF's text layer, so faced with a scan it correctly finds nothing — and it tells you so rather than handing back an empty file. Recognising the words inside the image is a different job, done by the scanned PDF converter: a separate tool that sends the pages to our own server, and only when you ask it to.
Heavily designed layouts — magazine spreads, infographics, pages with text flowing around images at odd angles — will lose some of their reading order. Straightforward documents like reports, papers, invoices, manuals and ebooks convert well.
Images inside the PDF are not extracted. The text around them is.
Why in-browser conversion matters
Most online converters upload your file to their servers, process it there, and hand back a download link. That means your document sat on someone else's disk, however briefly, governed by a privacy policy you did not read.
This tool never makes that request. The PDF is parsed by PDF.js running in a Web Worker on your own machine. You can verify it: open your browser's network tab during a conversion and you will see no upload. Even the PDF.js worker files are served from this domain rather than a third-party CDN, so no outside party learns that you converted anything at all.
Frequently asked questions
- How are two-column layouts handled?
- The left column is read in full before the right, rather than interleaving the two line by line as a plain text extraction would.
- Why did my table come out as paragraphs?
- Detection requires cells to align on the same columns across consecutive rows. Where a table's structure comes from drawn rectangles rather than text alignment, it stays as paragraphs — deliberately, since a wrong table is harder to clean up than plain text.
- Are repeated page headers and footers removed?
- Yes. Text that repeats at the same position across several pages is treated as page furniture and dropped, so it does not interrupt the document body.
- Can it handle password-protected PDFs?
- Yes. You will be prompted for the password, which is passed straight to the local parser and never transmitted or stored.
- What happens to very large PDFs?
- Files above 50 MB are rejected before parsing starts, and any single conversion running longer than 60 seconds is stopped so the browser tab stays responsive.
Related converters
Further reading
- Why conversion loses structurePDFs store positioned glyphs, not document structure. Understanding that explains every conversion error you will ever see.8 min read
- Cleaning up converted MarkdownWhat the converter emits, which Markdown features survive the trip, and the handful of tidy-up passes worth doing every time.7 min read
- Two-column reading orderWhy a two-column paper sometimes converts into alternating half-sentences, and what to do when it does.8 min read
- Long documentsA three-hundred-page document is not a big version of a short one. It fails in its own ways, and splitting first avoids most of them.8 min read