Skip to content

§ Bulk HTML to PDF

Bulk HTML to PDF: Batch Convert Thousands of Files by API

Convert one file in the browser tool below, free. When the job is hundreds or thousands of files at once, a batch belongs on a server, not in a browser tab. Here is how to bulk convert HTML to PDF reliably with one API call per document, and keep a dated copy of every one.

  • Early access, launching soon
  • No card required
  • Your HTML stays yours

§ Live demo

Runs in your browser. Nothing is uploaded.

Your PDF is downloading. Want this as one API call, with the page archived too?

§ Short answer

To bulk convert HTML to PDF, loop over your files or URLs and send each to a rendering API, running a handful of conversions in parallel rather than one at a time. A managed API handles the concurrency, retries and browser fleet for you, so a batch of 5,000 documents finishes in minutes instead of crashing a single headless Chrome. Sitepdf renders each document with managed Chromium and can attach a timestamped archive to every file, so a bulk run leaves you with the PDFs and a record of what each page said.

Last updated July 2026. Written and fact checked by the Sitepdf team.

§ 00

Ways to batch convert HTML to PDF, compared

A quick honest map of the batch options, from a one off desktop job to an automated pipeline. The right pick depends on how many files, how often, and whether you need a record.

Approach Good for Where it breaks
Browser tool, one file at a time A handful of documents, once Tedious past a dozen; no automation, no record
Self hosted Puppeteer loop Developers who want to own the stack Memory leaks and crashes on large batches; you build the queue and retries
wkhtmltopdf script Simple static pages Archived engine, no modern CSS or JS, no concurrency built in
Rendering API loop Automated bulk runs at any volume A paid API, but the fleet, concurrency and retries are handled
Sitepdf API with archive Bulk runs that also need a dated record Early access; join to get a key

For a true one off of a few files, use the free converter above and skip the code entirely.

§ 01

When a batch outgrows the browser

The converter at the top of this page renders a single file entirely in your browser, free and without a signup. It is the right tool for a one off. But the moment you have a folder of 500 invoices, a nightly export of statements, or a content pipeline turning thousands of articles into PDFs, clicking through them by hand stops being an option, and so does keeping a browser tab open long enough to finish.

Batch conversion is a server job. You want a process that reads a list of files or URLs, converts each one, handles the ones that fail without stopping the whole run, and writes the results somewhere durable. That is a loop plus a rendering engine, and the hard part has always been the engine, not the loop.

A batch run is one of four ways documents get generated automatically, and it is the one that breaks hardest because everything works fine in testing with five files. The guide to automating PDF generation covers all four patterns and where each one fails.

§ 02

How to bulk convert HTML to PDF with an API

The pattern is simple. Build your list of inputs, then send each one to the render endpoint, running several in parallel to keep the batch fast without overwhelming anything. Because the browser fleet lives on the API side, you are not babysitting Chromium processes or watching memory climb; you send requests and collect files.

Concurrency is the one dial that matters. Fire all 5,000 requests at once and you will hit rate limits and time outs; send them one at a time and a big batch drags on for an hour. A pool of roughly 5 to 20 in flight at a time is the usual sweet spot, tuned to your plan. Each response comes back with the PDF and, if you asked for it, a timestamped archive id. If a single document fails, you retry that one rather than the batch. This is the same render path documented on the URL to PDF API and convert HTML to PDF pages, run in a loop.

§ 03

Keep a dated copy of every document in the batch

Bulk generation is exactly where records matter most, because volume is where disputes and audits eventually surface. If you render 10,000 statements a month, the odds that someone asks about one of them approach certainty. Most batches of that size run on a timer rather than a button, and running report generation on a schedule covers the job design that keeps a monthly run idempotent and safe to retry. Add archive=true to each render in the batch and every document is stored as a timestamped snapshot under your account, retrievable by id, with retention you control. A bulk run then produces two things at once: the files your users need, and the record your auditor will want. The compliance archiving guide covers what to keep and how long.

§ 04

Why not just run headless Chrome yourself

You can, and for small steady batches it is fine. The trouble is that batch load is exactly what exposes a self hosted browser fleet: Chromium leaks memory and leaves zombie processes, a big run spikes RAM until the box falls over, and you end up building a queue, a process reaper, and a restart policy before the batch is reliable. That engineering is real and recurring. We break the true cost down in the library versus API comparison and in the Puppeteer alternative page. An API absorbs the fleet operations so your batch script stays a batch script.

A batch loop with bounded concurrency: convert many files, archive each, retry the failures.
# Convert a list of URLs to PDF, 10 at a time, archiving each
cat urls.txt | xargs -P 10 -I {} \
  curl -s https://api.sitepdf.com/v1/render \
    -H "Authorization: Bearer $SITEPDF_KEY" \
    -d url="{}" \
    -d format=Letter \
    -d archive=true \
    -o "pdfs/$(echo {} | md5sum | cut -c1-8).json"

# Each response carries the pdf_url and a timestamped archive id:
{
  "pdf_url": "https://api.sitepdf.com/v1/documents/doc_18f2c.pdf",
  "archive": { "id": "arc_bb417", "captured_at": "2026-07-19T11:03:55Z" }
}

The API is in early access; this is the documented call shape it opens with. Full request and response walkthrough.

§ 05

Questions about this job

How do I convert multiple HTML files to PDF at once?
Loop over your files and send each to a rendering API or headless browser, converting several in parallel to keep the batch fast. A managed API is the simplest path: you send each file or URL, it returns a PDF, and it handles the browser fleet, concurrency and retries. For a handful of files, a browser based converter one at a time is enough.
What is the best way to batch convert HTML to PDF?
For automated volume, a rendering API in a loop with bounded concurrency, roughly 5 to 20 conversions in flight at a time, so you stay under rate limits without dragging the batch out. It beats self hosting Puppeteer for large runs because memory leaks and crashes surface exactly under batch load. For a one off of a few files, use a free in-browser converter instead.
Can you bulk convert HTML to PDF for free?
For a small number of files, yes: an in-browser converter turns HTML into PDF one document at a time with no cost and no signup. True bulk automation, hundreds or thousands of files on a schedule, needs a server side engine or an API, which is where free tools stop and paid, reliable rendering starts. Test your templates in a free converter first, then automate.
How many HTML files can I convert to PDF at once?
With an API there is no fixed ceiling; batches of thousands are routine as long as you cap concurrency and retry individual failures. The practical limit is your plan and rate limit, not the tool. Self hosted headless Chrome hits a wall much sooner, because large batches expose memory leaks and process crashes that a managed fleet absorbs for you.
Can I keep a copy of each PDF in a bulk conversion?
Yes. With Sitepdf, adding archive=true to each render in the batch stores every document as a timestamped snapshot under your account, retrievable by id with retention you control. That turns a bulk run into both the files your users need and a dated record for audits or disputes, without a second system to manage.

§ Early access

Get on the early-access list

The API opens to the list first, in order. Early access locks the planned launch rates for 12 months. No card required, launching soon.

Render + archive, one API