HTML to PDF API
HTML to PDF API that matches the browser
Send raw HTML, Markdown or a URL. Get back a PDF that looks exactly like the page in Chrome, with cookie banners and ads already gone. For page archives, client reports and documents made from your own templates, without a browser to run.
HTML, Markdown or URL200 free renders a monthNo card

A PDF you do not have to fix
Print-to-PDF breaks layouts, and running your own headless Chrome means patching and babysitting it. SnapRender renders the page once and hands you the file.
-
Looks exactly like the page
Fonts, gradients, grid layouts and images as Chrome draws them, captured at twice screen resolution so text stays crisp when zoomed.
-
Content, not pop-ups
Cookie consent banners and ads are removed by default, so an archived page or a report shows what it was meant to show.
-
Your template in, a PDF out
POST up to 2 MB of your own HTML and CSS, or Markdown, and save the response. Nothing to install on your servers.
The screenshot endpoint, with format=pdf
One parameter turns a capture into a PDF. Everything else works the same: full page, width, device, dark mode, delay.
curl "https://app.snap-render.com/v1/screenshot?url=https://example.com&format=pdf&full_page=true" \
-H "X-API-Key: sk_live_your_key_here" \
--output page.pdfcurl -X POST "https://app.snap-render.com/v1/screenshot" \
-H "X-API-Key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Order #1042</h1><p>Total: $290</p>", "format": "pdf", "width": 1240}' \
--output order.pdfimport { SnapRender } from 'snaprender';
import { writeFileSync } from 'node:fs';
const snap = new SnapRender({ apiKey: 'sk_live_your_key_here' });
const pdf = await snap.capture({
html: renderTemplate(order), // your own HTML string
format: 'pdf',
width: 1240,
});
writeFileSync('order.pdf', pdf);from snaprender import SnapRender
snap = SnapRender(api_key="sk_live_your_key_here")
pdf = snap.capture(
"https://example.com/report",
format="pdf",
full_page=True,
)
with open("report.pdf", "wb") as f:
f.write(pdf)
Full parameter reference in the API docs.
| Parameter | What it does |
|---|---|
format=pdf | Returns a PDF instead of an image. |
url, html, markdown | Exactly one source: a public URL, raw HTML (2 MB) or Markdown (500 KB). |
full_page | The whole scrolled page, up to 32,768 pixels tall. |
width | Layout width, 320 to 3,840 pixels. 1240 is close to A4 at 150 dpi. |
block_ads, block_cookie_banners | Both on by default. |
dark_mode, device, delay | Dark rendering, a phone or tablet preset, or a wait for late content. |
Is it the right PDF for you?
These PDFs are an exact picture of the rendered page in a PDF file. Here is where that is the right shape, stated plainly.
A good fit
- Archives of what a web page showed on a given day
- Client reports and design sign-offs that must look exactly right
- Order confirmations and summaries rendered from your own HTML
- Shareable previews of dashboards and landing pages
Not the right tool
- Documents that need selectable or searchable text
- Invoices that accounting software must read
- Multi-page A4 or Letter documents with page breaks
- Fillable forms
For those, a text PDF engine serves you better.
What people turn into PDFs
Single pages, batches of 50, or a list of client sites every month.
-
EvidencePages kept for compliance
Terms, disclosures and claims captured as dated files you can hand over.
Read the guide -
AgenciesClient sites in the monthly report
A PDF of each client page, attached to the report without manual screenshots.
Read the guide -
Batch50 PDFs in one call
Send a list with
Batch screenshotsformat: "pdf"and get a download link for each file. -
Free toolOne page, right now
Paste a URL and download the PDF. No account, a few a day.
Open the tool
Screenshots as an API call
Send a GET request, get a PNG back. Ads and cookie banners blocked by default.
200 free renders a month. Paid plans start at $9.
See the render first
A PDF holds exactly this capture. Try your URL here, no sign-up needed.
Want the file itself? The webpage to PDF tool downloads it for you.
Try it on your URL
Live capture, no signup. You get the screenshot and the exact API call that produced it.
This is the exact API call that made the image above. Swap in your key and it runs anywhere.
200 renders a month free.
You hit the free demo limit here. The full tool can verify you are human and keep going.
Continue in the full toolQuestions
Can I send raw HTML instead of a URL?
Yes. POST up to 2 MB of HTML, or 500 KB of Markdown, with format set to pdf. It renders in real Chrome, so external images, web fonts, flexbox and grid all work as they do in the browser.
Is the text in the PDF selectable?
No. The PDF holds a sharp image of the rendered page, not a text layer. That suits archives, visual records and previews that must look exactly like the browser. If you need copy, search or screen readers in the file (contracts, accounting invoices), a text PDF engine is the better fit.
Does it split the page into A4 or Letter sheets?
No. The PDF is one page the size of the capture, with no page breaks. Set width to choose the layout (1240 pixels is close to A4 at 150 dpi) and full_page to include everything below the fold.
How long a page can it capture?
With full_page=true the PDF holds the whole scrolled page, up to 32,768 pixels tall. Longer pages are cut at that height. For content that appears late, add a delay of up to 10 seconds.
Are ads and cookie banners removed?
Yes, both are blocked by default, so the PDF shows the page content without consent pop-ups or ad slots. Turn either off with block_ads=false or block_cookie_banners=false.
How is PDF output billed?
A PDF counts as one render, the same as a PNG. Every plan includes PDF output, starting with 200 free renders a month.