PDF to Markdown Converter
Drop in a PDF and get its text back as Markdown, page by page. It is read in your browser with pdf.js and never uploaded. Headings and tables are not detected, so add that structure by hand.
Drop a PDF here or click to browse
Accepts .pdf files · Processed locally in your browser
How the PDF to markdown converter works
The PDF is read in your browser and never uploaded.
Drop in a PDF
Drag a PDF onto the box or click to pick one. The tool takes one file at a time.
Text extraction in your browser
pdf.js reads the text layer of each page. The page downloads the pdf.js worker script from cdnjs; your PDF itself is not sent anywhere.
Review the output
Lines are rebuilt from where text sits on the page, blank lines mark paragraph gaps, and a --- line marks each page break. Check multi-column pages for mixed-up order.
Copy and add structure
Copy the text, then add ## headings, lists and tables yourself. Clear resets the tool for the next file.
How do you convert a PDF to Markdown?
Drop the PDF into the box above and copy the text out. The converter uses pdf.js to read the text on each page, rebuilds the lines from where each piece of text sits, and leaves a blank line wherever the gap between lines is wide enough to look like a paragraph break. You get the document's words with paragraph breaks and a --- line between pages. That is valid Markdown, since the CommonMark specification renders a line of three hyphens as a horizontal rule, but it carries no headings, lists, tables or links. Those you add by hand.
How does the converter rebuild lines and paragraphs?
A PDF does not store paragraphs. It stores fragments of text, each drawn at a position on the page, and pdf.js hands those fragments over with their coordinates. The tool starts a new line when the next fragment sits higher or lower than the last by more than half the text's height, and adds a blank line when the jump is more than one and a half times the height, which usually means a new paragraph. Fragments on the same line are joined as they come. Where a PDF stores no space between two fragments, the words run together, and on a two-column page the columns can come out interleaved or in the wrong order. Single-column documents exported from a word processor convert best.
Why are there no headings or tables in the output?
Because the tool reads only the text and its position, and ignores everything else a PDF can carry. Fonts and sizes, which a reader takes as headings, are discarded. So is the tag tree of a tagged PDF. An accessible PDF can mark its headings in a structure tree, the method the W3C describes in its PDF9 technique ("Headings are marked up using the heading elements (H, H1, H2, ... H6) in the structure tree"), but this converter does not read tags. Add ## and ### headings where the document had them, rebuild tables with pipes or as HTML, and check the result in the Markdown to HTML converter. If the same content also exists as a web page, the HTML to Markdown converter keeps its headings, links and lists, so start from that instead.
Why won't my scanned PDF convert?
A scanned page is an image of text with no text layer underneath, so pdf.js finds nothing to read and the tool reports an error. Getting text out of an image takes optical character recognition (OCR). OCR can run in a browser, and Tesseract.js describes itself as "Pure Javascript OCR for more than 100 Languages", but this tool does not include it, and Tesseract.js says it does not support PDF files directly. The quickest free route is Google Drive. Google's help page on converting PDFs to text says to right-click the file in Drive and open it with Google Docs. It asks for files of 2 MB or smaller, with text at least 10 pixels high, and warns that lists, tables, columns, footnotes and endnotes are not likely to be detected.
Is it safe for confidential documents?
The PDF never leaves your browser tab. The pdf.js project is "community-driven and supported by Mozilla" and is built into Firefox from version 19; here it runs inside the page and reads the file you choose from your own disk. The page makes one network request on its behalf, for the pdf.js worker script from cdnjs.cloudflare.com, which carries code to your browser and nothing back. Password-protected PDFs return an error rather than a password prompt, so remove the password first in the app that set it.
Should you turn a PDF into a web page?
Not to get it indexed. Google's list of indexable file types includes Adobe Portable Document Format, on a page that opens by saying Google "can index the content of most text-based files and certain encoded document formats." Convert when you want the content to behave like the rest of your site: your own title and headings, site navigation, internal links to related pages, and edits that do not mean exporting a new file.
If you keep both versions, Google's guide to consolidating duplicate URLs says you can return a rel="canonical" HTTP header on non-HTML files to tell Google which URL is the canonical one. Point the PDF's header at the page. The same guide calls rel="canonical" annotations "a strong signal that the specified URL should become canonical", so the final choice stays with Google. Our glossary entry on indexing explains how to check in Search Console whether a URL made it into the index.
PDF to Markdown questions.
Common questions about the PDF to Markdown converter
Is my PDF uploaded to a server?
No. The file is read inside your browser tab by pdf.js, the open-source PDF library built into Firefox, and is never uploaded or stored. The only network request is for the pdf.js worker script, which the page fetches from cdnjs.cloudflare.com; that request carries code to you, not your document.
Why doesn't my scanned PDF convert?
A scanned page is a picture of text with no text layer, so there is nothing for pdf.js to read, and the tool shows an error instead. You need optical character recognition (OCR) first. Google Drive does it free: open the PDF with Google Docs, for files of 2 MB or smaller, though Google says tables, columns and footnotes are not likely to be detected.
Does it keep headings, tables and formatting?
No. The output is the document's text with paragraph breaks and a --- line between pages; headings, lists, tables, bold, links and images are not carried over. Even a tagged PDF that marks its headings as H1 to H6 loses them here, because the tool reads only text and its position. Add ## headings and rebuild tables by hand.
Why do some words run together or columns get mixed up?
The tool rebuilds each line from text fragments at the same height and joins them as they come, so where a PDF stores no space between two fragments, the words touch. It starts a new line when the vertical position jumps, so two columns side by side can come out interleaved or out of order. Single-column documents convert most cleanly.
Is there a file size or page limit?
The tool sets none. Every page is processed in your browser, so a very long PDF takes longer and uses more memory, and the practical limit is your device. Password-protected PDFs return an error.
Does Google index PDFs, or should I convert them to web pages?
Google indexes PDFs: its list of indexable file types includes Adobe Portable Document Format. Converting is worth it when you want the content on a page with your own title, headings, navigation and internal links. If you keep both, Google's canonical guidance lets you point the PDF at the page with a rel="canonical" HTTP header.
Publishing PDF content as a web page?
PDFs carry no heading levels, so the structure has to be added by hand. Once the page is built, paste its HTML into the free Heading Structure Analyzer to check the H1 to H6 outline before you publish.
What to do next.
Run these next
All 25- Markdown to HTMLConvert Markdown to clean, semantic HTML for your CMS
- HTML to MarkdownConvert HTML pages to clean Markdown for content migration
- AI Content OptimizerOptimize content for topical depth, readability, and AI citations
- AI Readability ScorerScore content readability and get improvement suggestions
