About PDF to Markdown Converter
Markdown is the easiest way to move the words of a PDF into a wiki, a README, a notes app or a static site generator. This tool reads the text layer of each page, joins broken lines back into paragraphs, turns text set clearly larger than the body into # headings, and recognises lines that start with a bullet or a number as list items, nesting them by how far they are indented.
The result is one plain .md file per PDF. It is a clean starting point, not a copy of the layout: images, tables, links, bold and italics are not carried over, and a scanned PDF has no text layer to convert.
How it works
- pdf.js, loaded from this site on first use, reads every string each page draws, with its position and font size.
- Strings on the same baseline become lines, and lines of a similar size set close together become paragraphs. A word split by a hyphen at a line end is closed up.
- Short blocks at least 15% larger than the body text become headings: the largest size #, the next ##, the rest ###, consistently across the document.
- A line starting with a bullet (•, ◦, ▪, –, - or *) or a number followed by a period or bracket starts a list item; items indented further than the one above are nested under it.
- Characters that Markdown would read as formatting, such as * _ [ ] and <, are escaped, so the text shows exactly as written in the PDF.
Questions
Why are some headings missed?
Headings are recognised by size alone. A heading set in bold at the same size as the body text looks like a paragraph to this tool. Turn headings off if large pull quotes are being marked as headings.
Are tables and images converted?
No. A table becomes paragraphs of its cell text, read row by row, and images are left out. Columns set side by side are read straight across the page.
Does it work on scanned PDFs?
No. A scan holds pictures of pages with no text in them, and the tool says so when it finds none. Run the page images through Image to Text first to recognise English print.
Is anything uploaded?
No. The PDF is read by code running in this browser tab, and the Markdown file is made there too.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.