PDF to Markdown
Extract text from a PDF and format it as Markdown.
PDF to Markdown extracts the text layer of a PDF and formats it as editable Markdown: heuristic headings from font sizes, paragraph breaks from vertical spacing, and --- between pages. Copy to the clipboard or download {basename}.md — fully local with PDF.js, no upload.
It is a layout-aware text extraction, not a perfect converter: tables, images, and inline bold are not rebuilt as Markdown syntax. Scanned PDFs without a text layer yield nothing (no OCR). Best as a draft you polish in your editor.
How it works
Each page’s getTextContent() items carry transform positions and sizes. Larger jumps in font size become # / ## / ### headings (when the line is short enough); vertical deltas decide paragraph vs line breaks; hasEOL forces a newline. Pages join with blank-line horizontal rules (---).
The result sits in an editable textarea. Copy uses the clipboard API; Download builds a text/markdown blob named after the PDF. Empty extraction toasts that the file may be scanned.
How to use
- Open PDF to Markdown (steps: Upload → Extract → Result).
- Drop or click your PDF file (accept application/pdf).
- Confirm the file chip (name + size) and Remove if wrong.
- Click Extract Markdown and watch Extracting Markdown… N%.
- Review Markdown Output in the textarea (headings, lists, page --- separators).
- Edit false-positive headings or reflow paragraphs as needed.
- Click Copy for the clipboard, or Download .md for {name}.md.
- Start Over to process another document.
Tips
- Works on born-digital PDFs; run OCR first for scans.
- Page --- separators import cleanly into Notion, Obsidian, and GitHub.
- Two-column layouts may interleave — expect to fix order manually for complex pages.
- Edits in the textarea are included in Copy and Download.
PDF to Markdown FAQ
Does it handle scanned PDFs?
No OCR — only an existing text layer. Empty result usually means a scanned image.
Are tables and images converted?
No. Output is text structured with heading/paragraph heuristics; tables/images are not reconstructed as Markdown.
Can I edit before saving?
Yes — the output textarea is fully editable; Copy and Download include edits.
Is my PDF uploaded?
No. Extraction runs entirely in the browser with PDF.js.
What filename is downloaded?
{original-basename}.md
Credits
- PDF.js — Text content with positions for heading/paragraph heuristics