Convert HTML to PDF with one API request.

Send your HTML to POST /v1/pdf, and a real Chromium browser on our servers lays it out with your CSS and web fonts and returns a PDF of up to 100 pages. You set the page size, margins, headers, and page numbers in the same request, and control page breaks with normal print CSS. Send raw HTML for a one-off, or save your HTML once as a design and send only the names and numbers for each new PDF. Nothing to install, and no browser to keep patched.

Free to start. No card needed.

HTML to PDF API

How to convert HTML to a branded PDF with an API

Read the transcript

Convert your HTML to PDFs that look like a designer made them, with your logo and colours on every page.

Without a designer, your PDFs often come out plain, and a plain report makes a good business look small.

So pick a designer-made template or bring your own HTML, and add your brand once.

Then your app sends this month's numbers, and you get the finished report back.

Next month, every client on your list gets a report in their own brand, even the small ones.

Make your first branded PDF free at thirds.ai, in under five minutes.

No code needed

How do I make a PDF from HTML without code?

Paste the HTML you already have into the editor, or pick a PDF template from the gallery. Mark the parts that change, type the details for this PDF, and download it. Each later PDF is the same design with new details.

  1. Pick a PDF template from the gallery and click Use this template, or choose Use your HTML and paste in your own.
  2. In your own HTML, mark each part that changes, like {{ client_name }} for a client's name.
  3. Type your business name and the details into the boxes beside the preview.
  4. Click Save and export PDF to download your PDF.
Browse the gallery
The thirds.ai editor with boxes for the business name, the email, and the invoice number beside the finished Northline Studio invoice PDF

After the first PDF

Set the layout once, then send only the data

A report, an invoice, or a certificate is rarely a one-off. Save the HTML once as a design with its page size, margins, and fonts, and every PDF after that comes from the same design with new names and numbers, whether your app, a spreadsheet, or your AI assistant asks for it.

Ask your AI assistant for the PDF

Once ChatGPT, Claude, Gemini, Grok, or any other AI you use is connected to thirds.ai, the PDF is one sentence away. Ask for a client's September report in plain words, and the assistant fills your saved design with the numbers and brings the finished PDF back in the chat.

Connect your AI assistant
A garden estimate from Fernleigh Gardens with a green header, a gold ribbon showing the £9,729.60 total, and a list of the planned work.
Price quote
An A4 offer letter with a deep teal header that says Welcome to the team, Niamh Gallagher, a large apricot circle showing a starting salary of £41,500 across the header edge, a ruled list of eight terms, and a soft panel to sign and accept the offer.
Job offer letter
1 credit
makes 1 PDF
Up to 100 pages
in one PDF
11 named sizes
A0 to A6, Letter, Legal, Ledger, Tabloid, plus any custom size
AES-256
when you set a password

From your own code

Make a PDF from HTML with the API.

This request fills a saved report design with September's numbers for Harrow & Vale Architecture and returns the PDF. Pin the version, and your team's later saves don't change your app's PDFs until you switch. The data is checked against the fields the design expects before the PDF starts, so a missing field comes back as a clear 400 instead of a blank spot in the report. You need an API key from your account and a design you saved in thirds.ai.

POST /v1/pdf
curl --fail-with-body --silent --show-error https://thirds.ai/v1/pdf \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: YOUR_UNIQUE_PDF_REQUEST' \
  --data '{
    "template_id": "tpl_YOUR_MONTHLY_REPORT_ID",
    "version": 1,
    "data": {
      "business_name": "Harrow & Vale Architecture",
      "period": "September 2026",
      "revenue": "£42,800",
      "clients": "18",
      "growth": "+24%",
      "highlights": "The new client guide cuts the time from first meeting to first project. Six teams now use the shared drawing library every week, and the Clifton Yard fit-out finished two weeks early.",
      "next_steps": "Agree the fee proposal for the Riverside extension, start drawings for the Dean Street warehouse, and book the planning pre-application meeting."
    },
    "pdf": {"format": "A4"}
  }'
The finished monthly report PDF with revenue of £42,800 in huge serif figures and two ruled columns for what went well and next month
The Harrow & Vale report this request makes, from the Monthly report template.

Fonts and brand

The fonts and logo in the PDF are the real ones.

A font that lives only on your laptop never reaches a PDF server, so the fallback font gets used and the layout shifts. Put your logo, colours, and WOFF2 fonts in a brand kit once, and every design you save uses them in each PDF. For raw HTML, load a licensed web font with @font-face, or use one of the built-in families, which cover Latin, Arabic, Hebrew, Devanagari, Japanese, Simplified Chinese, Thai, and emoji.

Design a template
The Aurelle Skin brand board with its colours, logo, font, and a sample letter, beside the name and tone card

Free to copy

Start from a PDF template instead of a blank page.

Each of these is a finished HTML design with print CSS, page breaks, and fields already in place. Open the HTML of any template and use it as the starting point for your own.

  • Client invoicePDF · A4
  • Campaign results reportPDF · A4
  • Portrait course certificatePDF · A4
  • Packing slipPDF · A4

For developers and agents

Raw HTML in, PDF out, with no browser to run.

Send raw HTML with a page size and margins, without saving a design first. Without a pdf object you get an A4 page with zero margins, so set the margins you want. The response is the job: 200 when it already finished, 202 while it still runs, and then you poll GET /v1/pdf/{id} or take a webhook. Reuse the same Idempotency-Key on a retry, and for 24 hours you get the same job back instead of a second PDF and a second credit. Each download link lasts 15 minutes, and the response carries the file's byte size and SHA-256 so you can check the copy you saved. Over the MCP server, an AI agent names the saved design, hands over the numbers, and gets the same PDF link back.

Make a Letter PDF from raw HTML
curl --fail-with-body --silent --show-error https://thirds.ai/v1/pdf \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: YOUR_UNIQUE_PDF_REQUEST' \
  --data '{
    "html": "<h1>Quarterly report</h1><p>Ready to share.</p>",
    "pdf": {
      "format": "Letter",
      "margins": {"top": "20mm", "bottom": "20mm"}
    },
    "filename": "quarterly-report"
  }'
Connect the MCP server
{
  "servers": {
    "thirds": {
      "type": "http",
      "url": "https://thirds.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

PDF options

What can I set on each PDF?

The pdf object in your request sets the paper. Your CSS sets everything on it. A saved design keeps its own page, so your app sends only the data.

  • Pick A4, Letter, Legal, or another named size, or give your own width and height in mm, cm, in, or px, and turn the page to landscape.
  • Set each margin. Headers and footers sit in the margin, with pageNumber and totalPages spans for page numbers.
  • Start a new page with break-before: page, and keep a heading with its text or a table row in one piece with break-inside: avoid.
  • Give the PDF a title, an author, and a subject, or a password the reader types to open it.
PDF and image options
A letter on an architecture studio letterhead, with a round seal logo, a gold and plum top bar, and a signed proposal letter.
Letterhead letter

Questions people ask before their first PDF

Make a sample PDF
Can I turn HTML with CSS and web fonts into a PDF?

Yes. A real Chromium browser lays out your page, so grid, flexbox, print styles, and web fonts work as they do in your own browser. Fonts and pictures load from public HTTPS addresses or from files you upload to your account, and the request sets the paper size, so a CSS @page size does not override it. Fix page breaks, headers, and fonts. Compare running Puppeteer or Playwright yourself.

How do I control where the pages break?

With CSS in your HTML. Put break-before: page on the element that starts a new page, break-after: avoid on headings so they stay with their text, and break-inside: avoid on table rows and totals. Set orphans and widows on paragraphs. Test an invoice with no rows, one row, and many rows, and let rows grow with their text instead of fixing their height.

Can I convert a page that isn't public?

Yes. Load the private data in your app first, then send the finished HTML, up to 5 MiB. Nothing behind your login has to be reachable from outside. Pictures in it can come from public HTTPS addresses or from images you upload to your account once.

How large can one PDF be?

One PDF can hold up to 100 pages and 25 MiB, and each PDF gets 30 seconds of layout time once it starts. Split a longer document into two PDFs. If a PDF goes over a limit, it stops and you pay nothing.

What happens if my request times out and I send it again?

Send the same Idempotency-Key with the same body, and for 24 hours you get the job you already started, not a second PDF or a second credit. The same key with a different body returns 409, so a mistake never hands you the wrong file. Build the key from your own record, such as the invoice number and a revision. Retry requests and download files.

Can I convert many HTML files to PDF at once?

Yes. Save your HTML as one design, then open Batches in the studio and upload a CSV with one row for each PDF. You download the finished PDFs together in one ZIP file. Make a certificate for each learner. Make weekly and monthly reports.

My page draws a chart with JavaScript. Does that work?

Yes. JavaScript is off by default, because finished HTML lays out faster and more predictably. Set javascript.mode to enabled, and when your chart has finished drawing, set data-thirds-render-ready on the html element. We wait up to two seconds for that marker and then capture the page, and the PDF fails if the marker never appears.

Can I try HTML to PDF for free?

Yes. Fill in a sample PDF in the playground with your own details, then click Download free to sign in and download the finished file. A verified free account gets 50 credits each month, so you can test your own HTML before you pay anything.

How long does a PDF take, and how do I get the file?

A short PDF with few pictures is ready sooner than a long one with many. Each PDF gets 30 seconds of layout time once it starts, and stops if it needs more. Your code gets a download link that lasts 15 minutes, and a fresh one each time it reads the job. The file itself stays for up to a year on a paid plan and 30 days on the free plan, and you can also download it from the Renders page in your account.

I use wkhtmltopdf today. Can I move?

Yes. Keep your HTML and swap the local command for a request to POST /v1/pdf. Move one document type at a time, because Chromium and Qt WebKit can wrap text and break pages differently. The guide maps each wkhtmltopdf option to the matching request field. Move from wkhtmltopdf. Pick a wkhtmltopdf alternative.

HTML to PDF API

Turn the HTML you already have into PDFs you can send today.

Paste in the HTML you have or pick a template, and you'll hold a PDF with your logo on it a few minutes from now. From then on, your app asks for each new one with a single request.