You have a live web page and you want a PDF of it. An invoice rendered from a route. A dashboard snapshot for a report. A receipt page a customer should be able to save. The job sounds small. It is not.

If you do it yourself, you run headless Chromium. That means a browser binary in your image, cold starts when an instance spins up, memory you have to budget for, and version drift every time you upgrade. You end up babysitting infrastructure that has nothing to do with your product. A url to pdf api takes that off your plate. You send a URL, you get a PDF back.

But these services are not interchangeable. Some run real Chromium. Some still run an old WebKit fork that chokes on modern CSS. Some are screenshot tools that grew a PDF endpoint. Some hand you a raw browser and make you write all the code yourself. Pricing ranges from a few cents per render to four-figure monthly plans. Picking the wrong one means either re-platforming later or paying for capability you do not need.

This post compares six real options: PDFBase, Urlbox, PDFShift, Api2pdf, Browserless, and DocRaptor. PDFBase is one of them, and we will be straight about where it wins and where another tool fits better. If after reading this you decide to keep the work in-house instead, that is a legitimate call too, and we have a full guide on how to convert a URL to PDF with Puppeteer, Playwright, or an API for readers who want to self-host it.

How to evaluate a URL-to-PDF API

Before the tool-by-tool writeups, set the criteria. These are the dimensions that actually change your life once the thing is in production.

  • Rendering engine. Real Chromium gives you everything modern Chrome does: CSS Grid, Flexbox, web fonts, gradients, custom properties. An old WebKit fork (the wkhtmltopdf lineage) does not. If your page was built for 2026 browsers, the engine is the single biggest factor.
  • JavaScript and SPA support. Many pages render nothing until JS runs. A React, Vue, or Svelte app is blank HTML plus a script tag. The API has to execute JavaScript and wait for the app to paint, or your PDF is an empty shell.
  • Wait conditions. Closely related. Can you wait for a CSS selector to appear, for the network to go idle, or for a fixed delay? Without real wait controls you will ship PDFs that capture a half-loaded page.
  • Auth, cookies, and headers. Real pages sit behind logins. You need to pass cookies, custom headers, or basic auth so the API can reach the same page your user sees.
  • Output options. Do you get a signed URL you can hand to a browser, or raw bytes you can stream straight to a response? Can you set page size, margins, and print background? Both buffer and URL output matter depending on whether you store the file or pass it through.
  • Pricing model. Per-render pay-as-you-go is honest for spiky or low volume. Subscriptions are cheaper per unit at scale but you pay whether you render or not. Match the model to your traffic shape, not to a headline number.
  • Free tier. Can you build and test without a card? A real free allowance is the difference between trying it tonight and filing a procurement ticket.
  • Developer experience. Is there an SDK or just a REST endpoint? Are the docs honest? When a render fails, do you get a useful error, or a generic 500 and a guessing game?

Keep these in mind as we go. Almost every difference between these six maps back to one of them.

The services, one by one

PDFBase

PDFBase is a unified PDF API built for developers and AI agents. For the URL-to-PDF job, you pass either a url or raw html, and it renders on warm Chromium instances running on dedicated infrastructure. Real Chromium means full CSS and full JavaScript: a single-page app renders the same way it does in Chrome, because it is Chrome.

You choose your output. Ask for output: 'url' and you get a signed URL with an expiry, good for handing straight to a browser or emailing to a user. Ask for output: 'buffer' and you get the raw bytes to stream into an HTTP response or write to your own storage. You control page size, margins, and print background, and you can pass wait conditions so the PDF captures the page only after it has finished painting.

Two things set it apart for this job. First, debug mode: pass a debug flag and the response includes a screenshot of the rendered page, the console logs, and the list of resources that failed to load. When a font is missing or an API call 403s behind the scenes, you see exactly why instead of staring at a blank PDF. Second, there is an MCP server, so an AI agent can call the same rendering directly as a tool. If you are wiring PDF generation into an agent workflow rather than a classic backend, that is a real shortcut.

The free tier is 100 credits with no credit card, which is enough to integrate and load-test a real flow before you decide anything.

Where it is weak: it is a newer service, so it does not carry the multi-year track record some buyers want, and it is not the right pick if your core need is print-shop typography rather than web rendering (see DocRaptor below). It is honest about being a Chromium renderer with great developer ergonomics, not a paged-media print engine.

Here is the whole thing in one call. URL in, signed PDF URL out.

pdfbase-url-to-pdf.js

import PDFBase from 'pdfbase'

const client = new PDFBase('pk_live_...')

const pdf = await client.pdfs.create({

url: 'https://example.com/invoices/1042',

format: 'A4',

printBackground: true,

waitFor: '#invoice-ready', // wait for selector

cookies: [{ name: 'session', value: token }],

output: 'url',

debug: true

})

console.log(pdf.data.url) // signed URL

console.log(pdf.debug.screenshot) // rendered preview

console.log(pdf.debug.console) // page console logs

Urlbox

Urlbox started as a screenshot API and is one of the strongest in that category. PDF is a first-class output alongside PNG, JPEG, and full-page captures. Because the product was built around faithfully rendering live web pages, the rendering controls are deep: it runs modern Chromium, executes JavaScript, and gives you a rich set of wait conditions, viewport sizes, and options for blocking ads, hiding cookie banners, and injecting custom CSS or JS before capture.

That heritage shows. If your job is fundamentally "make a faithful picture of this URL," whether that picture is an image or a PDF, Urlbox is excellent at it. The options for handling messy real-world pages, the things that pop up, slide in, or lazy-load, are more thought-through than most.

Pricing is subscription based, tiered by render volume. That is great if your usage is steady and predictable, and less ideal if it is spiky or very low. There is a trial to evaluate it.

Where it fits: teams that need both screenshots and PDFs from URLs, especially against difficult public pages, and that have steady volume to justify a subscription. If you only ever need PDF and never screenshots, you may be paying for breadth you will not use.

PDFShift

PDFShift is a focused, no-nonsense HTML/URL-to-PDF REST API. You send a URL or an HTML string, you get a PDF. It runs Chromium, so CSS support is modern and JavaScript executes. The API surface is small and easy to reason about, with options for page format, margins, headers and footers, and waiting for the page to settle. There is no SDK gymnastics to learn: it is a clean REST call you can fire from any language.

Pricing is credit based, where one conversion is one credit, with monthly plans sized by credit allowance. That is simple to forecast: if you know roughly how many PDFs you generate a month, you know your bill.

Where it fits: developers who want the most direct path from URL to PDF without extra surface area. It does the one job cleanly. The flip side of that focus is that you will not find screenshot output, an MCP server, or deep browser-automation hooks here. It is a converter, and a good one, not a platform.

Api2pdf

Api2pdf is a thin, cheap wrapper over several open-source engines: headless Chrome, wkhtmltopdf, and LibreOffice. You pick the engine per request. That is unusual and occasionally useful: if you are migrating off a legacy wkhtmltopdf setup and want byte-similar output, you can keep using that engine through the API while you plan a move to Chrome rendering.

The pricing model is genuinely pay-per-use, billed by the megabyte of output, with no monthly minimum. For low or bursty volume that can be the cheapest option on this list by a wide margin. There is no subscription floor to clear.

Where it fits: cost-sensitive or low-volume projects, and migrations where you need wkhtmltopdf compatibility on tap. The trade-off is that you inherit the engines' limits. Choose the wkhtmltopdf engine and you get wkhtmltopdf's old WebKit rendering and its weak modern-CSS support; choose Chrome and you are back to standard Chromium behavior. Api2pdf is a convenient front door to these engines, not a rendering layer that improves on them.

Browserless

Browserless is a different animal. It is not a URL-to-PDF endpoint; it is a hosted browser you connect to with Puppeteer or Playwright over WebSocket. You write the automation. You navigate, you wait, you click, you call page.pdf(). Browserless just runs the Chromium so you do not have to host it.

This is maximum control. Anything you can script in Puppeteer, you can do: log in through a form, dismiss a modal, scroll to trigger lazy loading, set a precise viewport, then print. If your page needs a genuine sequence of interactions before it is ready for capture, nothing on this list matches Browserless for flexibility.

The cost of that control is code. You own the Puppeteer script, the wait logic, the error handling, and the upgrades when the Puppeteer or Playwright API shifts. A dedicated URL-to-PDF API is one HTTP call; Browserless is a small automation program you maintain. Pricing is subscription based on usage units and concurrency.

Where it fits: teams that already think in Puppeteer or Playwright and need full browser control for capture flows that a simple "give me a PDF of this URL" call cannot express. If your need is straightforward, this is more rope than you want.

To make the control-versus-convenience contrast concrete, here is the Browserless style: you drive the browser yourself.

browserless-url-to-pdf.js

import puppeteer from 'puppeteer-core'

const browser = await puppeteer.connect({

browserWSEndpoint: 'wss://chrome.browserless.io?token=...'

})

const page = await browser.newPage()

await page.setCookie({ name: 'session', value: token })

await page.goto('https://example.com/invoices/1042', {

waitUntil: 'networkidle0'

})

await page.waitForSelector('#invoice-ready')

const pdf = await page.pdf({ format: 'A4', printBackground: true })

await browser.close() // you manage the lifecycle

Both samples wait for the same selector and pass the same session cookie. The difference is who writes the orchestration. With a dedicated API it is parameters; with Browserless it is your code.

DocRaptor

DocRaptor is the specialist on this list. It renders HTML to PDF using the Prince engine, a commercial typesetting engine built specifically for paged media. That is a meaningfully different thing from a browser printing a page. Prince has deep support for the CSS paged-media spec: running headers and footers, precise page-break control, footnotes, page counters, leaders, and print typography that a Chromium print path simply does not handle as well.

If you are producing documents where print correctness is the whole point, books, contracts, multi-page financial statements, anything with exacting headers, footers, and pagination, DocRaptor is in a class of its own. It also does URL input, but its center of gravity is high-fidelity print output rather than capturing arbitrary live web pages.

Pricing is premium and subscription based, which reflects the Prince licensing underneath. You pay for the typesetting quality. There is a free test mode that watermarks output so you can evaluate fidelity before committing.

Where it fits: print-grade paged documents where CSS paged-media support is non-negotiable. Where it does not: Prince is not Chromium, so some modern web CSS and JavaScript-heavy SPA behavior renders differently than it would in Chrome. For "snapshot this dynamic web app," a Chromium-based service is the safer match. For "produce a beautifully paginated printed document," DocRaptor is hard to beat.

Render any URL to PDF in one call

PDFBase runs warm Chromium so you skip the cold starts and the browser ops. Signed-URL or buffer output, real wait conditions, and a debug screenshot when something looks off.

The comparison at a glance

Here is how the six stack up on the dimensions that matter. Pricing is described as a model rather than a number, because plans change and the model is what should drive your decision.

Engine JS / SPA Auth / cookies Output Pricing model Best for
PDFBase Chromium Full Cookies, headers Signed URL or buffer Credits, 100 free Dev-first URL/HTML to PDF, AI agents (MCP)
Urlbox Chromium Full Cookies, headers PDF + screenshots Subscription by volume Screenshots and PDFs of tough public pages
PDFShift Chromium Full Cookies, headers PDF (URL or bytes) Credits per conversion Simple, focused URL/HTML to PDF
Api2pdf Chrome / wkhtmltopdf / LibreOffice Full (Chrome engine) Per engine PDF (URL or bytes) Pay-per-use, by MB Cheap, low volume, legacy compatibility
Browserless Chromium (you drive) Full Full (you script it) Whatever you code Subscription by usage Maximum control via Puppeteer/Playwright
DocRaptor Prince (paged media) Limited vs Chrome Cookies, headers PDF (print-grade) Premium subscription Print-quality paged documents

Which one should you pick?

Skip the spreadsheet. Match your actual situation to one of these.

You want a clean developer experience and maybe an AI agent in the loop

Pick PDFBase. One call, real Chromium, signed-URL or buffer output, and a debug screenshot plus console logs when a render looks wrong. The MCP server means an agent can call it as a tool directly. Start on 100 free credits.

You need screenshots and PDFs of messy public pages

Pick Urlbox. Its screenshot heritage gives it the best handling of cookie banners, ads, and lazy-loaded content. Best when volume is steady enough for a subscription and you genuinely use both image and PDF output.

You want the simplest possible URL-to-PDF call

Pick PDFShift. A small, predictable REST API that does one job well, billed per conversion so your costs track your usage cleanly. No platform surface you do not need.

You are cost-sensitive, low-volume, or migrating off wkhtmltopdf

Pick Api2pdf. Pay-per-use with no monthly floor makes it the cheapest at low volume, and per-request engine choice lets you keep wkhtmltopdf output while you plan a move to Chrome rendering.

You need full browser control for a complex capture flow

Pick Browserless. If you must log in, click, scroll, and orchestrate before printing, drive Puppeteer or Playwright against a hosted browser. Accept that you own the script and its maintenance.

You are producing print-grade paged documents

Pick DocRaptor. When running headers, footnotes, and exact pagination matter more than capturing a live SPA, the Prince engine and its CSS paged-media support are worth the premium price.

What if you skip the API entirely?

An API is not the only answer. If your volume is tiny, your page is simple, and you already run a server with room to spare, hosting Chromium yourself is a defensible choice. You pay in ops instead of dollars: the binary in your image, the cold starts, the memory budget, the browser lifecycle. For a weekend project that math often works.

If you want to go that route, we wrote the full self-host playbook: Convert URL to PDF with Puppeteer, Playwright, and an API walks through the code and the tradeoffs end to end. Read it, weigh the ops cost honestly, and then decide whether an API is buying back enough of your time to justify the spend. For most teams past hobby volume, it is.

Wrapping up

There is no single best URL-to-PDF API, only the best one for your constraints. If you need print-grade pagination, DocRaptor. If you need to script a complex capture, Browserless. If you want the rock-bottom price at low volume, Api2pdf. If you want screenshots and PDFs of difficult pages, Urlbox. If you want the simplest focused converter, PDFShift.

And if you want real Chromium rendering with a clean developer experience, signed-URL or buffer output, honest debug output when something breaks, and an MCP server for AI agents, that is where PDFBase fits. It will not out-typeset Prince and it will not out-flex a hand-written Puppeteer script. It is built to make the common case, turning a URL into a correct PDF, fast and pleasant.

You can grab 100 free credits with no credit card, or kick the tires first with the free URL to PDF tool. The docs cover wait conditions, auth, output options, and the MCP server.