PDF to Markdown
Turn a PDF into Markdown: headings, paragraphs and lists read from the text’s size, weight and place, as a .md file.
PDF Workspace
Add PDFs to start
Drop PDFs or images here, or choose them. Merge, split, reorder, rotate, edit, sign, convert or compress — as many steps as you like, with undo — and download one checked file.
PDFs up to 300 MB each, 5,000 pages in all; JPG, PNG and other images become pages. Password-protected PDFs ask for their password.
Your files are read and written in this browser. They are not uploaded to ToolsDev or anyone else.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
PDF to Markdown takes the text out of a PDF and writes it as Markdown, the plain-text format that README files, wikis, note apps and documentation sites use. A PDF does not record which line is a heading or a list item — only where each piece of text is drawn, how large, and in what font — so this reads those signs back: lines set clearly larger than the body text become headings (#, ## or ###, by how much larger), a short line all in bold becomes a small heading, lines that start with a bullet or a number become list items, nested by their indent, and lines close together become one paragraph. Every page starts with a comment giving its number, which Markdown viewers do not show. Characters that Markdown treats as formatting, such as * and _, are escaped, so the text reads exactly as it was written.
How to use it
- Choose a PDF, or drop it on the page.
- Select pages if you want only some; with none selected, every page is read.
- In Convert, press Save as Markdown. Each page is read, with progress shown.
- Download the .md file. The result says how many headings and list items were found, and which pages had no text.
- Open it in any Markdown editor — the Markdown workspace on this site is one — and look it over.
Limits and your data
- Headings and lists are a judgement made from size, weight and position, not something the PDF records. A large quote may become a heading, and a list without bullets stays a paragraph; check the result.
- Tables come out as lines of text, not Markdown tables. Pictures, links, bold and italic within a sentence are not kept.
- Two columns, footnotes and captions come out in the order the file stores them, which is not always reading order. Running headers and footers stay on every page.
- Scanned pages are pictures and have no text. OCR PDF reads them first; its searchable PDF can then be converted here.
- A word broken across two lines with a hyphen keeps the hyphen ("docu-ment"); a PDF cannot say whether the hyphen belongs to the word.
- Your files are read and written in this browser tab. They are not uploaded to ToolsDev or anyone else, and nothing is saved: closing the tab ends the session, so download what you want to keep. The page downloads its own code, and pdf.js's fonts and image decoders when a page needs them, from toolsdev.in — none of those requests carries your files.
Questions
Why did a line become a heading when it is not one?
Because it is set noticeably larger than most of the text, or it is short and entirely bold. Change the # marks in your editor; the words themselves are as the PDF stores them.
Which Markdown does it write?
CommonMark, which GitHub, GitLab, Obsidian, Notion imports and most static-site generators read. Nothing specific to one of them is used.
Does it work with Hindi, Chinese or Arabic PDFs?
The text comes out as the file encodes it, in UTF-8. A well-made PDF gives readable text in any script; one made with old non-Unicode fonts gives letters that look wrong, as copying from it would. Chinese, Japanese and Korean lines are joined without spaces.
Can I get a Word document instead?
Not here: a faithful Word conversion needs an office suite on a server, which ToolsDev does not run. Markdown opens in Word through many converters, and pastes cleanly into most editors.