Convert PDF to Markdown
PDF to Markdown turns the existing text of a PDF into a .md file, with headings, paragraphs and lists where it can detect them. It does not OCR, so scanned pages come out empty.
Drag and drop files here, or click to choose
Accepts PDF · up to 500.0 MB per file · up to 20 files at once
You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.
PDF to Markdown runs pdf-inspector on the file's existing text and returns a `.md` download (`text/markdown`). Headings, paragraphs, and lists are the goal. Pixel-perfect layout is not.
It does not OCR. Image-only pages often come out empty. For scans, use OCR to Markdown; that tool already returns `.md` and is the one that looks at pixels.
Reading order can disagree with a multi-column visual layout. Running headers may repeat every page; delete them in an editor. Equations that were images in the PDF do not become LaTeX. Code listings often lose indentation.
This is the converter for docs-as-code, Git diffs, and pipelines that want text. Keep the PDF when print layout is the record. Copyright still applies to the extracted words; only convert files you may republish as text.
Password-protected files are unlocked for you on this page once you enter the password; API callers run Unlock first. Open the Markdown and fix heading levels before you commit it. Markdown to PDF on this site is the reverse direction; a round trip will not restore the original layout.
Uploads are temporary. We do not keep a Markdown library of your documents.
What the output looked like on a local server. A PDF exported from a word processor with a title, a paragraph, two headings, a two-item bullet list and a three-row table came back as `# Annual Report`, the paragraph, `## Findings`, `- First item` and `- Second item`, `## Numbers`, and a pipe table with a `|Year|Revenue|` header row and the two data rows. Headings, lists and simple tables survived. The line after the list ran straight into the next heading without a blank line, so skim the result before you publish it.
A PDF whose text used a monospaced font (a plain-text file converted to PDF) came back as a single fenced code block, with the heading-like first line inside the fence rather than as a `#` heading. Expect that for PDFs of code, logs or typewriter-style documents, and remove or move the fences if you want paragraphs.
An image-only PDF, made from three pictures with Images to PDF, returned HTTP 200 with a `text/markdown` body of zero bytes. An empty download therefore means the file has no text layer, not that the conversion failed. A file that is not a PDF returns 400 with `invalid_pdf`, and an encrypted one returns 400 with `password_required`.
Choosing the neighbor: PDF to Text is the one to try when you want the words without Markdown markers, PDF to CSV is for tables, and OCR is the tool for scans. Use PDF to Markdown when the target is a repository, a static site generator or a prompt, where headings and lists matter more than page geometry.
The download is named after the upload, so `doc.pdf` returned `doc.md`.
Features
- pdf-inspector extract of native PDF text to Markdown
- Does not OCR; scans need the OCR tool
- Download is `text/markdown` with a `.md` name
- Anonymous API at /api/v1/convert/pdf/markdown
When to use this tool
- Move a PDF README into a Git repository
- Feed article text into a prompt pipeline
- Draft web copy from a PDF brief
- Turn an exported policy document into Markdown so a diff shows exactly which sentences changed between versions
- Pull the text of a long report into a notes tool that understands headings and lists
How do I convert a PDF to Markdown?
- Prefer a text-based PDF. For scans, use OCR to Markdown instead.
- Upload the PDF and click Process.
- Download the `.md` file.
- Fix heading levels, repeated headers, and tables in your editor.
- If the download is empty, the PDF has no text layer. Switch to OCR instead of retrying.
- Scan the result for blank lines missing before headings and for code fences wrapped around ordinary text, then preview it in your Markdown renderer.
Limits and edge cases
- No OCR; image-only pages extract little or nothing
- Layout fidelity is limited
- Complex tables may need hand fixes
- An image-only PDF returns a successful, zero-byte file rather than an error
- Monospaced-font text was returned inside a code fence in a test
- A blank line can be missing before a heading that follows a list
- Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.
Test results and conditions
- Test file: a one-page PDF made with WeasyPrint from HTML containing a title, a paragraph, a subheading, a two-item bullet list, a bordered two-column table and a two-column text block.
- The title, the paragraph, the subheading and the bullet list came back as `# Annual Report`, plain text, `## Findings` and `- First item` / `- Second item`.
- The bordered table did not become a Markdown pipe table: its heading row came out as `### Region Sales` and the rows as `North 120 South 98`. Use PDF to CSV or Extract Tables for tables.
- The two-column text block was read straight across the page, so lines from the left and right columns were interleaved. Expect that on multi-column layouts.
- A scanned (image-only) PDF returned HTTP 200 with an empty file. An empty download means the file has no text layer; use OCR to Markdown.
Examples
- A text whitepaper becomes a .md file with paragraphs and headings
- A scan without OCR yields little or no useful Markdown
- A word-processor export with a title, two headings, a bullet list and a three-row table produced `# `, `## ` headings, `- ` bullets and a pipe table
- A PDF made from three pictures returned an empty `.md` with HTTP 200
- A text file converted to PDF in a monospaced font came back as one fenced code block of about 210 lines
Privacy for this tool
Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.
Frequently asked questions
- Why is my Markdown empty?
- The PDF likely has no text layer. Use OCR to Markdown for scans. This tool only reads text already in the file.
- Is this the same as OCR?
- No. OCR looks at image pages. PDF to Markdown uses pdf-inspector on native text.
- Does this keep fonts?
- Markdown is text plus light structure. Fonts come from whatever renders the Markdown later.
- Can I convert Markdown back to PDF?
- Yes via Markdown to PDF. Layout will not match the original PDF.
- Are tables converted?
- Simple ones can be. A three-row test table came back as a Markdown pipe table with its header row. Merged cells, nested tables and tables spread over several pages may need hand fixes; PDF to CSV is the better target when only the table matters.
- Why is the whole document inside a code block?
- A test PDF set in a monospaced font came back wrapped in a fenced code block. That is how the extractor treated the text. Delete the fence lines if the text is really prose.
- Why is the .md file empty even though the request succeeded?
- The server returned HTTP 200 with an empty body for an image-only PDF. There was no text to extract. Run OCR for scans and photos of pages.
- What error do I get for an encrypted or damaged PDF?
- An encrypted file returns 400 with reason `password_required`; the page asks for the password and API callers run Unlock first. A file that is not a PDF returns 400 with `invalid_pdf`, and the hint suggests Repair.
- Should I use Markdown or plain text?
- Use Markdown when headings and lists should survive into a repository or a prompt. Use PDF to Text when you only want the words and no markup.
Last updated:
Call this from code
Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.
curl -X POST "https://pdf123.xyz/api/v1/convert/pdf/markdown" \
-F "[email protected]" \
-o output.pdfAlso available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference
Use it from an AI agent
SkillClaude Code, Codex, Cursor and other AI agents can run PDF To Markdown for you with this skill: /skills/pdf123-pdf-to-markdown.md
Files are used only for this processing job and deleted automatically afterward.