Skip to main content

Markdown to PDF API

Send Markdown in one request and get a cleanly styled PDF back, with tables, code blocks and page numbers.

Convert Markdown to PDF in one request

POST the Markdown to /quickjob with input_type "markdown". The response body is the PDF.

Markdown to PDF with curl

markdown-to-pdf.sh
curl -X POST https://api.podpdf.com/quickjob \
  -H "X-API-Key: $PODPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_type": "markdown",
    "markdown": "# Release notes\n\n| Version | Date |\n|---|---|\n| 2.1 | 2026-11-01 |\n\n- [x] Faster exports",
    "options": {
      "format": "A4",
      "margin": { "top": "20mm", "bottom": "20mm", "left": "20mm", "right": "20mm" }
    }
  }' \
  --output release-notes.pdf

A README to PDF in Node.js

readme-to-pdf.mjs
import { readFile, writeFile } from 'node:fs/promises';

const markdown = await readFile('README.md', 'utf8');

const res = await fetch('https://api.podpdf.com/quickjob', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.PODPDF_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ input_type: 'markdown', markdown }),
});

await writeFile('README.pdf', Buffer.from(await res.arrayBuffer()));

A README to PDF in Python

readme_to_pdf.py
import os, requests

with open("README.md", encoding="utf-8") as f:
    markdown = f.read()

res = requests.post(
    "https://api.podpdf.com/quickjob",
    headers={"X-API-Key": os.environ["PODPDF_API_KEY"]},
    json={"input_type": "markdown", "markdown": markdown},
)
res.raise_for_status()

with open("README.pdf", "wb") as f:
    f.write(res.content)
  • Up to 25 pages in under 30 seconds
  • Up to 5 MB of Markdown per request
  • The X-PDF-Pages header gives the page count
  • Many files: POST /bulkjob, up to 200 in one job

What the Markdown to PDF API handles

GitHub Flavored Markdown

Tables, task lists, strikethrough, fenced code blocks and autolinks, parsed the way GitHub shows them.

Clean default styling

Body text, code, tables and blockquotes get a readable print stylesheet, so a README becomes a document without any CSS.

PDF back in the response

Up to 25 pages within 30 seconds. Longer files run as a background job up to 100 pages.

A whole folder at once

Convert up to 200 Markdown and HTML files in one bulk job, uploaded as a ZIP.

Page size, margins and footers

A4, Letter or a custom size, landscape, margins, and header and footer templates with page numbers.

Accessible output

Ask for PDF/UA-1 or PDF/UA-2 and get a tagged PDF checked by veraPDF (alpha).

Markdown to PDF API questions

Which Markdown syntax is supported?
GitHub Flavored Markdown: headings, bold, italic, strikethrough, inline code, nested lists, task lists, tables with header rows, blockquotes, fenced code blocks, links, images from absolute URLs and horizontal rules.
Can I use my own CSS?
Markdown is rendered with PodPDF’s default stylesheet. For full control, convert the Markdown to HTML yourself and send it with input_type "html" and your own styles.
Do images in my Markdown work?
Yes, when they use absolute HTTPS URLs. Relative paths such as ./images/chart.png cannot be resolved because only the Markdown text is sent.
How do I convert many Markdown files?
Upload them as a ZIP and submit one bulk job with POST /bulkjob: up to 200 files and 50 MB. You get back one ZIP with a PDF per file, and a webhook when the job is finished.
What does it cost?
10 PDFs are free to start, with no card. Then $0.005 per PDF on a monthly plan, or $0.01 with one-off credits.

Need your own layout?

Send HTML and CSS instead, or convert a live web page by URL.