Guide · 4 min read · Updated 2026-08-09

How to Convert PDF to Markdown

Markdown is the sweet spot between plain text and full HTML: you keep the document structure, but the result is still readable as-is. That makes it the best format for docs, notes and anything headed for an LLM.

Drop your file hereor choose a file from your deviceAccepted: PDF

This file never leaves your browser.

Convert your file

Drop a PDF below to get a .md file with headings, paragraphs and lists preserved. Nothing is uploaded.

How heading levels are worked out

A PDF has no idea what a heading is. It only knows that a particular line was drawn at 24 points and the body text was drawn at 11. So the converter measures the font size of every text run, builds a histogram of the sizes used in the document, and treats the most common size as body text.

Sizes above that baseline become headings, ranked largest to smallest and mapped onto Markdown levels — the biggest becomes an H1, the next distinct size an H2, and so on. Because the scale is derived from your specific document, a report using 28/20/14/11 pt gets sensible levels without any configuration.

The result line tells you how many heading levels were detected. If it says one, the PDF probably uses bold body text rather than larger type for its headings, which cannot be distinguished by size.

Steps

  1. 1
    Choose the PDFProcessing happens locally in your browser.
  2. 2
    ConvertFont sizes are profiled, then text is emitted with # markers at the matching depth.
  3. 3
    Check the heading countA sensible document usually reports two to four levels.
  4. 4
    Download the .mdOpen it in any editor — VS Code, Obsidian, Typora, or paste it straight into a chat.

Tidying the output

Converted Markdown is usually 90% of the way there. The remaining 10% is almost always one of these:

  • Running headers repeated on every page — delete the repeated line once you spot the pattern.
  • Hard line breaks mid-sentence, because the PDF wrapped the line. Join them, or let your renderer reflow soft wraps.
  • Page numbers on their own lines between sections.
  • A title page that becomes several stray H1s.

All four are quick find-and-replace jobs, and all four are consequences of the source being a fixed-layout format rather than flaws in the conversion.

Frequently Asked Questions

Are tables converted to Markdown tables?

Tabular content comes through as text in reading order rather than pipe-delimited Markdown tables. If you specifically need the table, run the same PDF through PDF to CSV, which is built for grid detection.

Are images extracted?

No. Markdown output is text only. If you need the page visuals, PDF to SVG keeps the artwork as vectors.

Is bold and italic preserved?

Not reliably. Weight and style live in font names inside the PDF, and those names vary wildly between generators, so we do not guess. Headings, which are detectable by size, are preserved.

Why Markdown instead of plain text for LLMs?

Headings give a model the document hierarchy, which measurably improves summarisation and question answering over a flat wall of text. We cover this in the LLM-specific guide.

Related Tools

Related Guides