How to Convert a PDF to Markdown for Notes and LLMs
September 23, 20264 min readHow heading, list, and table detection works when converting a PDF to Markdown, and why Markdown is a better LLM input than raw text.
Markdown has become the default format for notes, documentation, and — increasingly — for feeding content into an LLM. If you’ve got the source material as a PDF, converting it to Markdown first gives you clean, plain-text structure instead of a wall of unformatted text pasted straight out of a PDF reader.
How the conversion works
Toolify’s PDF to Markdown tool reads the position and size of every piece of text on each page and uses a few layout heuristics to reconstruct structure:
- Headings. Lines of text in a noticeably larger font than the page’s typical body text become
#,##, or###headings — bigger text becomes a higher-level heading. - Lists. Lines that start with a bullet character (•, -, *) or a number followed by a period become proper Markdown list items.
- Tables. When several consecutive lines share a consistent multi-column pattern, they’re rendered as a Markdown table. Anything less consistent is left as plain paragraph text rather than guessed at.
- Links. Clickable links in the original PDF are detected and turned into proper Markdown
[text](url)links.
This is a layout-based, best-effort reconstruction — not a true understanding of the document — so it’s great for notes, docs, and LLM input, but complex tables or unusually designed layouts may need a bit of manual cleanup afterward.
How to convert a PDF to Markdown
- Open PDF to Markdown and select your PDF.
- The tool analyzes every page’s layout locally in your browser.
- Review the Markdown preview, then copy it or download it as a
.mdfile.
Why Markdown instead of plain text?
Plain text extracted from a PDF loses all visual structure — headings look identical to body text, and lists lose their bullets. Markdown preserves that structure as lightweight syntax that both humans and machines can parse. That matters especially for LLM workflows: a model given Markdown-structured input can much more reliably tell a heading from a caption, or a list from a paragraph, than it can from an undifferentiated text blob.
Getting a cleaner result
- PDFs exported from a document editor (rather than scanned) convert far more accurately, since font-size differences are preserved.
- Scanned PDFs have no real text to analyze — run them through OCR PDF first.
- Always skim the table sections; layout-based table detection is the least reliable part of any PDF conversion.