Why convert a PDF to Markdown?
A PDF keeps text in fixed positions on a page, which is perfect for printing but awkward when you want to work with the words. Copying text out of a PDF often gives broken lines, lost headings and page numbers in the middle of sentences. Markdown is plain text with simple marks for structure, so the result stays readable as it is and turns into a tidy page in any Markdown editor.
Typical reasons:
- Feeding a document to an AI tool. Paste a report or a contract into ChatGPT, Claude, Gemini or Copilot as clean text with its headings and tables, instead of a jumble of copied lines.
- Taking notes. Bring an article, a lecture handout or a manual into Obsidian, Notion, Logseq, Bear or Joplin.
- Documentation and GitHub. Turn a PDF manual or specification into a README, a wiki page or a docs page.
- Editing in a plain text editor. Markdown is easy to change, compare and keep under version control.
What carries over
| In the PDF | In the Markdown file |
|---|---|
| Headings | "#" and "##" headings |
| Paragraphs | Paragraphs separated by blank lines |
| Bold and italic text | Kept, marked with asterisks |
| Bullet points (•, ◦, ▪) | "- " list items |
| Simple tables | Markdown (GFM) tables; number columns right-aligned |
| Pictures | Left out, or saved in an images folder (ZIP) |
| Page numbers, page breaks | Removed in "Continuous text"; a marker per page in "Keep the PDF pages" |
| Fonts, colours, columns | Not kept |
Tips for a cleaner result
- Use the original file. A PDF exported from Word, Google Docs or LaTeX converts much better than a scan or a photo of a page.
- Convert only what you need. For a long PDF, extract the pages you want first. A shorter Markdown file is also easier for an AI tool to handle in one go.
- Remove private details first. Before you paste a document into an online AI tool, take out names and numbers with Redact PDF, or delete them in the .md file. The guide how to prepare a PDF for ChatGPT walks through every check.
- Preview the result. Open the .md file in a Markdown editor or on GitHub to check headings and tables at a glance.
Need a different format? PDF to text gives plain text with no marks at all, PDF to HTML makes a web page, and PDF to Word gives an editable document.
If something goes wrong
The Markdown file is empty or almost empty. The PDF is probably scanned, so its pages are pictures without text. Make it searchable with OCR PDF first.
Words are joined or split strangely. Some PDFs store each letter separately or use unusual fonts. The text is placed as well as possible; fix the odd word in a text editor.
A line became a heading by mistake, or a heading was missed. Headings are recognised by size and weight. Add or remove the "#" at the start of the line.
The PDF asks for a password. Open it with Unlock PDF using the password you know, then convert the unlocked copy.