PDF.js reads every text fragment with its font size. The tool measures the body-text size, labels anything meaningfully larger as a heading (largest as #, then ##, then ###), turns lines that start with a bullet, hyphen or number into list items, re-joins wrapped lines into paragraphs, and inserts --- between pages.
Not inferred: tables, inline bold and italic, and inline links. Scanned PDFs have no text to read and need OCR first. The output lands in an editor so you can tidy before downloading or copying.
Markdown is the format that everything downstream accepts: note apps, static-site generators, wikis, version control, and the language models people increasingly paste documents into. A PDF is the format things arrive in. The tool above is the bridge, and it is honest about being a well-informed guess rather than a perfect reconstruction, because a PDF simply does not record the structure Markdown needs.
How to convert a PDF to Markdown
Check the PDF has text
Select a word in any reader. If it highlights on its own, there is a text layer. If the whole page selects, it is a scan and needs OCR first.
Add the PDF
Drop it or browse. It is read into memory; nothing is uploaded.
Press Convert to Markdown
Text is extracted with sizes and positions, the structure is inferred, and the Markdown appears in the editor.
Tidy, then copy or download
Scan the top-level headings, fix any mislabelled line, join or split a paragraph at a page boundary, and download the .md or copy it.
Measured against the document's own body text, so it adapts to each file.
So you can find them, and remove them where a paragraph straddled a page.
Reports, papers and contracts are read on your machine.
What the heuristics infer
- HeadingsLines meaningfully larger than body text
- ParagraphsConsecutive body lines re-joined
- ListsLines starting with a bullet, hyphen or number
- Page breaksA horizontal rule between pages
- TablesNot inferred; cell text as paragraphs
- Inline bold and italicNot inferred; style data is unreliable
- Inline linksNot inferred; anchor and URL rarely align
The heading rule is the one that matters most and the one most likely to need a glance. It works because almost every document sets headings larger than body text. It stumbles on documents that do the same thing for other reasons: a drop cap, a chapter number stamped in the margin, a pull quote. Those become headings, and deleting the hash marks takes a second.
Tidying the output
- Read the headings first. Scroll the editor looking only at lines starting with #. Mislabelled decorative text stands out immediately.
- Join broken paragraphs. Occasionally a line break inside a paragraph survives. Delete the newline.
- Remove the rule where a paragraph crossed a page. The
---between pages is there to be found; delete it and join the halves. - Rebuild the tables you need. Cell text arrives as lines. For a table that matters, convert that page with PDF to Excel and paste it as a Markdown table by hand.
- Add the emphasis back where it matters. Bold and italic are not carried, so a defined term or a warning may need its asterisks restored.
Which PDFs convert well
Documents with a clear typographic hierarchy
- Reports and white papers with sized headings
- Academic papers, minus their tables
- Manuals and documentation exported from a docs tool
- Anything that was Markdown or Word before it was a PDF
- Single-column layouts
Layout carries the meaning
- Scans without a text layer: OCR first
- Multi-column layouts, where line order can interleave
- Slides and posters with text in boxes
- Forms and tables: use PDF to Excel
- Documents that set headings in the same size as the body
Where the Markdown goes
- Reading notes. A paper's structure becomes an outline to annotate in a notes app.
- Documentation migration. An old PDF manual becomes the seed of a wiki or a docs site.
- Preparing text for a language model. Markdown is the input format most tools handle best, and a structured extract beats a raw paste.
- Editing. Fixing a typo in Markdown is a keystroke. Fixing it in a PDF is an editing session.
Why the extraction runs in your browser
The documents people convert to Markdown are the ones they are working with most closely: research, internal reports, contracts under review. Uploading them to an extraction service so the text can be pulled out hands the whole document to a third party for a job a browser does in a second.
The tool is right above
Everything on this page runs in your browser. Scroll up, drop the file, and keep it on your machine.
Common questions
What people ask with the Markdown in the editor.
01How does heading detection work?
The tool measures font sizes across the document, treats the most common size as body text, and labels lines meaningfully larger as headings: largest as #, medium as ##, slightly larger as ###.
02What about tables and images?
Table cell text is captured as ordinary lines. Markdown tables are not inferred, because column detection from a PDF is unreliable. Images are skipped.
03Does it work on scanned PDFs?
No. A scan has no text layer, so there is nothing to read. Run it through OCR first, then convert the result.
04Can I edit the Markdown before downloading?
Yes. The output appears in an editor first, so you can fix anything the heuristics got wrong, then download the .md or copy it.
05Why are some ordinary lines marked as headings?
Because they were set larger than the body text: a drop cap, a chapter number, a pull quote. Delete the hash marks; it takes a second.
06Are bold and italic preserved?
No. Font style information in PDFs is not reliably exposed, so inline emphasis is not inferred. Restore it where it matters.
07Are my files uploaded anywhere?
No. Extraction and conversion happen in your browser.
08Is it free?
Free. Every tool, unlimited use, no signup.