HTML and CSS to PDF, without a headless browser

Send HTML and get the PDF in the same response. Page size, margins, headers, footers and page numbers are set in CSS. The free tool and the API work without an account.

No account · 10 free renders a day · up to 100 KB

Try it without an account or API key:

curl --fail -X POST \
  https://api.pdfrender.dev/v1/render \
  -H 'Content-Type: application/json' \
  -d '{"html": "<h1>Hello</h1>"}' \
  -o hello.pdf
import requests
r = requests.post(
    "https://api.pdfrender.dev/v1/render",
    json={"html": "<h1>Hello</h1>"},
    timeout=60,
)
r.raise_for_status()
open("hello.pdf", "wb").write(r.content)

Features

Page layout in CSS

Set the paper size and margins with @page. Headers, footers and page numbers go in the page margins, and table headers repeat on every page.

One call, one PDF

POST your HTML and the response body is the PDF. There are no job IDs to poll and no storage to set up.

No browser to run

WeasyPrint 70 lays out the pages. It runs no JavaScript and fetches no URLs, and you install no browser.

Same HTML, same PDF

The PDF carries no timestamps, so the same HTML gives the same file, byte for byte. That holds as long as the engine version stays the same.

A tool for agents

The MCP server offers the render as a tool that returns a 15-minute download link and the page count. It uses the same API key and credits as the REST API.

How it works

  1. Try your HTML in the free tool

    Paste up to 100 KB of HTML and see the PDF. You need no account.

  2. Call the API

    POST the same HTML to /v1/render. The response is the PDF.

  3. Add a key for volume

    Without a key, 10 renders a day are free. Plans with higher limits are on the pricing page.

  • Hosted in Germany

    Servers at Hetzner in Nuremberg. HTML and PDF are processed in memory and not stored. A PDF from the MCP tool stays in memory for 15 minutes, for its download link.

  • Limits

    2 MB of HTML, 50 pages, and 20 s per render with a key, 8 s without. Over a limit you get an error code, not a cut-off PDF, and pay nothing. A one-page invoice renders in under a second.

  • Assets inline

    Images, fonts and CSS go into the HTML as data: URIs. External URLs are rejected with a list of what to inline.

  • Fonts

    DejaVu Sans, Serif and Mono are installed. Load any other font with @font-face and a data: URI.

Plans

Free

€0 a month

100 PDFs a month

Essential

Recommended

€20 a month

10,000 PDFs a month

  • PDF/A-2b and PDF/A-3b output

Scale

€80 a month

100,000 PDFs a month

  • PDF/A-2b and PDF/A-3b output

FAQ

Which CSS works?

Print CSS works: @page, margin boxes, page counters, page breaks and repeating table headers. Flexbox and grid work for simple layouts. Media queries with min-width are ignored, so Tailwind breakpoints do not apply. The CSS guide has the details.

Does JavaScript run?

No. Render charts to SVG before you send the HTML. Pages that need a script to show their content need a browser-based service.

What does a render cost?

With an API key, a render costs 1 credit, whatever its page count. Rejected requests cost nothing. Without a key, 10 renders a day are free. Plans are on the pricing page.

When is pdfrender the wrong tool?

When the page needs JavaScript, when you want a PDF of a live URL, or for more than 50 pages. pdfrender also makes no tagged PDF, and its output differs from Chrome's.

Does pdfrender make PDF/A?

Yes, on the paid plans. Set pdf_variant to pdf/a-2b or pdf/a-3b. The output is checked with veraPDF on pdfrender's sample documents. Without a paid plan, the call gets 403 with an upgrade link.

Need more?

For more volume than the Scale plan, or a data processing agreement (DPA), email contact@pdfrender.dev.

Who runs pdfrender?

pdfrender is built and run by Michael Sann. Questions and bug reports go to contact@pdfrender.dev and are answered by Michael Sann personally.