📝
PDF/PDF to Markdown

PDF to Markdown

Convert PDF text into structured Markdown — headings from font sizes, bullets preserved. 100% in-browser.

100% LOCALHeading heuristicsLists & italicsCopy or .md100% local
📝
Drop a PDF here, or click to browse
Text-based PDFs (scanned pages need OCR first)

Drop a text-based PDF and convert it to structured Markdown

Data Source & Legal Disclaimer
Effective: 2026Last updated: TodayUpdate: Manual review
Sources: pdfjs-dist text layer

Markdown conversion runs entirely in your browser with pdf.js. Your file is never uploaded. Works on PDFs with embedded text — scanned pages need OCR.

See all data sources & update policy →

How text becomes Markdown structure — illustrated

PDFs have no headings — only positioned glyphs. The converter groups each page's text items into visual lines by Y coordinate, then compares every line's font height to the page's median: ≥1.6× becomes #, ≥1.3× becomes ##, and ≤0.75× (footnotes, captions) becomes italics. Bullet glyphs (• – -) map to Markdown lists, numbered lines to ordered lists. This is honest heuristics, not magic: unusual layouts can mis-title a line, so skim the preview. If the output is empty, the PDF is scanned images — use the PDF OCR tool instead.

Text items → visual lines → font-size headings → Markdown
Page text itemsglyphs with positionsno semantics at allLines + font heightgrouped by Y · max sizeper linemedian = referenceRatio rules≥ 1.6× → #≥ 1.3× → ##≤ 0.75× → *italic*• → - list.md fileheadings · listsparagraphsscanned (image-only) PDFs have no text layer — run PDF OCR first

Font height relative to the page median is the only heading signal PDFs provide — bigger means more important.

Publishing a spec to the wiki — Sam's conversion

Sam has a 12-page PDF spec whose wiki import eats Markdown, not PDFs.

  1. Convert:He drops the PDF; page 3's font-height scan finds the 18 pt section titles at 1.64× the 11 pt body median — they become ## headings, and the 24 pt document title becomes #
  2. Inspect the heuristics:The preview shows one false positive — a large pull-quote became a heading; he fixes that single line by hand, far cheaper than retyping 12 pages
  3. Count the structure:The stats row reads 4,180 words · 31 headings · 1 title — matching the spec's 12 numbered sections plus subsections
  4. Import:spec.md downloads and the wiki renders headings, bullet lists, and paragraphs correctly on the first try
↩ Back to converter

About this tool

What is this tool?

Convert PDF to Markdown online free. Font-size heading detection, lists, copy or download .md.

Heading heuristicsLists & italicsCopy or .md100% local

From PDF Layout to Markdown Structure

PDFs store positioned glyphs, not paragraphs; Markdown needs structure. The converter first rebuilds lines by clustering characters on shared baselines, then infers hierarchy from typography: lines at 1.6x the median font size become top-level headings, 1.3x becomes subheadings, and bullets become list items. The result is a Markdown file that reflects the visual hierarchy, not just the character stream.

Honest Heuristics, Editable Output

Font-size heuristics are usually right and occasionally surprised by letterheads or title pages - the tool demotes duplicated headings and defaults the document title to the file name to blunt the worst cases. Output lands in an editable text area: fix a heading if the heuristic guessed oddly, then copy or download. For scans with no text layer at all, the tool points you to PDF OCR instead of returning an empty success.

Frequently Asked Questions

How are headings detected?

The tool reads every character font size, computes the median, and classifies lines relative to it: at least 1.6x the median becomes a top-level heading, at least 1.3x becomes a subheading, and noticeably smaller text renders italic. This heuristic works across documents that use completely different point sizes.

What if the PDF has no text layer?

Scanned PDFs are images with no extractable text, and this tool will return an empty result rather than pretending. Use the PDF OCR tool instead - it recognizes text from page images and hands the result back as editable text.

Why does my output have an unexpected heading at the top?

Repeated large text (like a letterhead) can win the heading heuristic. The tool also demotes duplicate headings and uses the file name as the document title by default. A quick scan of the output before use is recommended - the heuristics are honest, not magic.

Related tools

Joke of the Day
Sep 7

Why did the elephant paint its toenails red?

100% Free, Forever

Keep Tools Free for Everyone

No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.

Support me on Ko-fi— keep tools free

100% of proceeds go towards hosting & building more free tools.