Turn HTML into PDFs

Send HTML, get a PDF download link. Invoices, reports, receipts, contracts. If you can build it in HTML, we can turn it into a PDF.

Send HTML, get a PDF

Pass an HTML string in the request body. We render it and return a download link.

const response = await fetch('https://api.pdfshot.com/convert', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: '<h1>Invoice #1234</h1><p>Amount: $99.00</p>'
  })
});

const { url } = await response.json();
// url = "https://cdn.pdfshot.com/abc123.pdf"

Or just send a URL

Point us at any public webpage. We'll fetch it, render it, and give you the PDF.

const response = await fetch('https://api.pdfshot.com/convert', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://pdfshot.com/demo/invoice'
  })
});

const { url } = await response.json();
// url = "https://cdn.pdfshot.com/def456.pdf"

Why PDFShot

A PDF API that does one thing well.
  • Accurate Rendering
    CSS Grid, Flexbox, web fonts, and print styles all render correctly.
  • Fast Response
    Most single-page documents convert in under a second. No waiting around.
  • Simple API
    POST your HTML or a URL. Get back a JSON response with a link to your PDF.
  • Stored Templates
    Save your HTML templates and render them with variables. Good for invoices or any doc you generate repeatedly.
  • Auto-Expiring Links
    PDF links expire after 1 hour and the files are deleted. Your documents don't stick around.
  • Pay As You Go
    5 free render minutes every month. After that, $0.20 per minute. No subscriptions, no minimums.