PDF to Markdown API

One endpoint. Send a PDF, get structured markdown back. Tables, headings, lists — all preserved. No signup to try it.

$ curl -X POST https://pdftomarkdown.dev/v1/convert \
  -H "Authorization: Bearer demo_public_key" \
  -H "Content-Type: application/json" \
  -d '{"input":{"pdf_url":"https://pdftomarkdown.dev/samples/invoice.pdf"}}'
{
  "markdown": "# Invoice\n\n| Item | Qty | Price |\n|---|---|---|\n| API Pro Plan | 1 | $49.00 |\n\n**Total: $49.00**",
  "pages": 1,
  "request_id": "req_abc123"
}

What it handles

Not a wrapper around Tesseract. A vision-language model that sees document layout the way you do — including scripts most OCR tools stumble on. Japanese and Chinese documents are a first-class strength, not an afterthought: measured 0.00–0.10% character error rate on scanned government documents, ~10× fewer errors than Tesseract.

Invoices & receipts

Research papers

Legal contracts

Financial reports

Japanese & Chinese docs

Scanned documents

Locales 日本語ページ 中文页面

Use it from Python

One HTTP call. Nothing to install beyond requests.

python
import requests

r = requests.post(
    "https://pdftomarkdown.dev/v1/convert",
    headers={"Authorization": "Bearer demo_public_key"},
    json={"input": {"pdf_url": "https://pdftomarkdown.dev/samples/invoice.pdf"}},
)
print(r.json()["markdown"])

Or skip the code entirely

The official CLI converts a local file, URL, or stdin in one command. Nothing to install with Node 18+.

terminal
$ npx pdftomarkdown document.pdf > document.md

Set PDFTOMARKDOWN_API_KEY for your own key, or run keyless on the demo tier. Using Claude Code? Install the official plugin and Claude reads PDFs on its own. Full details in the CLI guide.

Pricing

Both tiers are free. No credit card.

Hacker

Free, no signup

  • Public demo key
  • Only page 1 is processed
  • 3 req/min per IP
  • Watermark in output
View docs →

Developer

Free, GitHub login

  • Personal API key
  • 100 pages/month
  • Multi-page PDFs
  • No watermark
Get API key →

Frequently asked questions

Is the PDF to Markdown API free?
Yes — both current tiers are free. The Hacker tier needs no signup at all: the public key demo_public_key converts page 1 of any PDF at 3 requests per minute. The Developer tier (GitHub login, no credit card) gives a personal key with 100 pages per month and full multi-page conversion.
How do I convert a PDF to markdown without signing up?
Send one HTTP request with the public demo key, or run npx pdftomarkdown document.pdf in a terminal (Node 18+, nothing to install). Both work immediately — the demo tier processes page 1 of the document.
Does it work on scanned PDFs?
Yes. A vision-language model performs real OCR on every page, so image-only PDFs convert the same way as digital ones — including tables and multi-column layouts. See the measured benchmark on simulated scans.
How accurate is it on Japanese and Chinese documents?
In our published benchmark on scanned government documents, the measured character error rate was 0.10% on Japanese prose and 0.00% on Simplified Chinese prose — roughly 10× fewer errors than Tesseract on identical inputs, with a complex forecast table returned as a complete table. Full methodology and reproduction steps.
How long does a conversion take?
Expect roughly 10–30 seconds per page — a GPU performs real OCR. The first request after a quiet period can add a cold-start wait of a minute or more. The call is synchronous and returns finished markdown; set your HTTP client timeout to at least 10 minutes for large documents, or bound latency with input.max_pages.
Can coding agents like Claude Code, Codex, or Cursor use it?
Yes — that's a primary use case. Claude Code has an official plugin; Codex and Cursor read PDFs via the CLI with a copy-paste AGENTS.md block or Cursor rule. Agents can also discover the API themselves through llms.txt and the OpenAPI spec.

Paste this into your terminal. No account needed.

curl -X POST https://pdftomarkdown.dev/v1/convert \
  -H "Authorization: Bearer demo_public_key" \
  -H "Content-Type: application/json" \
  -d '{"input":{"pdf_url":"https://pdftomarkdown.dev/samples/invoice.pdf"}}'