0

PDF to Markdown Converter

Extract a PDF's text as structured Markdown: real heading detection from font size, list detection from bullets and indent — not one flat wall of text.

📑

Drag & Drop PDF document here

or Click to browse PDF files

Buy Me a Coffee at ko-fi.com
Processing... 0%
Loading PDF
Extracting text with positions
Detecting headings and structure
Done

Result

A plain "PDF to text" dump gives you every word with none of the shape: a page title reads exactly like a footnote, and a bulleted list turns into a run-on sentence. This tool goes one step further by reading each text item's real font size and position from the PDF — via the same pdf.js engine this site's other PDF tools use — and using that visual evidence to reconstruct structure: headings, list items, and paragraphs, written out as Markdown.

The detection is genuinely measurement-based, not a guess dressed up as one. Text items on a page are grouped into lines by how close their vertical positions are, each line's font size is computed from its own text-rendering matrix, and that size is compared against the median line size for the whole document — the size most lines actually use, i.e. ordinary body text. A line noticeably larger than that median becomes a Markdown heading (the largest lines become #, moderately larger ones become ##); a line that starts with a bullet character or sits indented past the surrounding lines becomes a `- ` list item; everything else is treated as body text and merged into paragraphs.

This is honestly a heuristic, not a structural parser: PDF files carry no guaranteed semantic markup, only visual instructions for where ink goes, so a designer's unusual font choices can occasionally fool the size comparison, and tables are explicitly out of scope — cell layouts don't reduce to headings, lists, or paragraphs in any reliable way, and this tool does not pretend otherwise. Each page is clearly marked with a "Page N" divider in the output, matching the convention used by this site's PDF-to-text tool.

Scanned pages get the same honest treatment as elsewhere on this site: a page that is really just a photograph of paper has no text layer at all, so instead of silently producing an empty section, the tool notes exactly which pages it could not read and points to the Image to Text (OCR) tool for those. Everything runs locally in your browser — nothing is uploaded, there are no page limits, and the result lands in a text box you can copy or save as a .md file that opens in any Markdown-aware editor.