PDF to Markdown with tables and headings kept
PdfParse turns a PDF or a scanned page into clean Markdown. Headings become hash levels, tables become pipe tables, lists stay lists, and text follows the order a person reads it, not the order the file happens to store it.
Convert a page to Markdown right here
Drop a file and the result opens on the Markdown tab, next to the rendered page with every block outlined.
What one call returns
Page one rendered with every block outlined, next to the JSON your code receives.
- Reading text layer
- Detecting layout
- Extracting tables
- Building JSON
Headings, paragraphs, tables and totals detected
Portsmouth, NH 03801
| Description | Qty | Unit | Amount |
|---|---|---|---|
| Oak countertop, 2.4 m | 2 | 640.00 | 1,280.00 |
| Cabinet doors, shaker | 12 | 85.00 | 1,020.00 |
| On site fitting | 1 | 450.00 | 450.00 |
Quote the invoice number with your transfer.
Goods remain ours until paid in full.
Pages 2 and later are parsed after you create an account.
{ "document": { "pages": 2, "parsed_pages": 1, "language": "en" }, "pages": [ { "number": 1, "blocks": [ { "type": "heading", "text": "Invoice", "bbox": [48, 52, 132, 84] }, { "type": "paragraph", "text": "Harbor Street Joinery, 14 Dock Lane, Portsmouth" }, { "type": "key_value", "pairs": { "Invoice no.": "INV-2026-0418", "Issued": "Oct 14, 2026", "Due": "Nov 13, 2026" } }, { "type": "table", "columns": ["Description", "Qty", "Unit", "Amount"], "rows": [ ["Oak countertop, 2.4 m", 2, 640.00, 1280.00], ["Cabinet doors, shaker", 12, 85.00, 1020.00], ["On site fitting", 1, 450.00, 450.00] ] }, { "type": "total", "label": "Total due", "value": 2983.75, "currency": "USD", "confidence": 0.98 } ] } ], "fields": { "invoice_number": { "value": "INV-2026-0418", "confidence": 0.99, "page": 1 }, "total": { "value": 2983.75, "confidence": 0.98, "page": 1 }, "due_date": { "value": "2026-11-13", "confidence": 0.97, "page": 1 } } }
Downloads from the demo include a watermark field and cover page one only.
Page one is parsed in your browser, so your file never reaches our servers.
One demo per day from this network. Create an account to parse more pages.
$ curl https://api.pdfparse.ai/v1/parse \ -H "Authorization: Bearer $PDFPARSE_API_KEY" \ -F file[email protected] \ -F outputs=json,markdown,csv
Markdown you can paste straight into a prompt or a docs repo
Each call returns one Markdown string for the whole document, plus the same content as structured JSON if you ask for both. Headings carry their real level, so a section title on page 4 nests under the chapter that opened on page 2.
- Heading levels from H1 to H4, detected from layout and font weight, not from guesswork about bold text
- Tables written as GitHub style pipe tables, with header rows marked
- Numbered and bulleted lists with their nesting kept
- Page breaks marked with a comment line so you can map text back to a page
- Repeated headers, footers and page numbers removed from the body text
## 3. Payment terms
Invoices are due within 30 days of the issue date.
| Item | Qty | Unit price | Total |
|---|---|---|---|
| Annual license | 1 | 4,800.00 | 4,800.00 |
| Onboarding | 1 | 1,200.00 | 1,200.00 |
<!-- page 2 -->
From file to Markdown in four steps
-
1
Upload a PDF, PNG, JPG or TIFF in the web app, or send it to the API as a file or a URL.
-
2
The engine reads the layout, finds columns, and runs OCR on any page that has no text layer.
-
3
Blocks are ordered, typed as heading, paragraph, list or table, and written out as Markdown.
-
4
You get the Markdown in the response, or by webhook for larger files, together with page level usage.
Why the Markdown stays readable on difficult files
Most converters dump text in the order the PDF stores it. That is how two column papers come out as interleaved half sentences. PdfParse rebuilds reading order first, then writes Markdown.
- Multi column pages are read column by column, with sidebars and callouts kept apart from body text.
- Tables with merged cells are flattened into a pipe table that keeps the header, and the full cell spans stay in the JSON output.
- Scanned pages go through OCR before layout analysis, so a photographed contract gets headings too.
- Rotated pages are turned upright before reading, including landscape tables inside portrait reports.
- Running headers, footers and page numbers are detected across pages and left out of the Markdown body.
Request Markdown from the API
One POST to /v1/parse with outputs set to markdown. Small files answer synchronously; larger ones return a job id you can poll or receive by webhook.
curl https://api.pdfparse.ai/v1/parse \
-H "Authorization: Bearer pp_live_your_key" \
-F "[email protected]" \
-F 'outputs=["markdown"]' \
-F "ocr=auto"
import os
from pdfparse_ai import PdfParse
client = PdfParse(api_key=os.environ["PDFPARSE_API_KEY"])
result = client.parse("annual-report.pdf", outputs=["markdown"])
with open("annual-report.md", "w") as f:
f.write(result.markdown)
Teams that convert PDFs to Markdown
- AI engineers who feed manuals, policies and reports into LLM prompts and need structure the model can follow.
- Documentation teams moving legacy PDF guides into a Markdown based docs site.
- Knowledge base owners who index product sheets and handbooks in a search tool.
- Analysts who want a readable text copy of filings they can diff from quarter to quarter.
Which plan covers Markdown output
Markdown, JSON and CSV output, tables and OCR for scans are part of every plan, starting with Starter at $49 a month or $24 a month billed yearly for 2,000 pages. Growth at $149 a month adds RAG chunking with metadata, webhooks and batch jobs of up to 500 files, which matters once you convert whole libraries. Scale at $499 a month adds form field and checkbox detection and zero retention mode. Compare every limit on pdf extraction api pricing.
- Starter 2,000 pages, 1 API key, 1 seat $49 per month $24 per month, $288 billed yearly
- Growth 7,000 pages, 5 API keys, 3 seats $149 per month $74 per month, $888 billed yearly
- Scale 24,000 pages, 20 API keys, 10 seats $499 per month $249 per month, $2,988 billed yearly
- Enterprise 72,000 pages, unlimited API keys with per key limits, 25 seats $1,499 per month $749 per month, $8,988 billed yearly
FAQ
Does the Markdown keep tables?
Yes. Every table becomes a pipe table with its header row. When a table has merged cells, the Markdown shows the flattened grid and the JSON output keeps the exact row and column spans.
Can I convert scanned PDFs to Markdown?
Yes. With ocr set to auto, pages without a text layer are read by OCR first. Headings and lists are then detected on the recognized text the same way as on a digital PDF.
How are images and charts handled?
Images are returned as image blocks with their position in the JSON. In the Markdown they appear as a short image marker in reading order, so the surrounding text keeps its context.
What counts as a page?
One page of a PDF or one image file. A 40 page report converted to Markdown uses 40 pages of your monthly allowance, whatever outputs you request in that call.
Can I get Markdown and JSON from the same call?
Yes. Pass both values in outputs and you are charged once per page. Most teams keep the Markdown for prompts and the JSON for page numbers and bounding boxes.
Turn your next PDF into Markdown
Create an account, get an API key and convert the first file in a few minutes.