HTML → PDF API

Render any URL or HTML into a pixel-exact PDF.

One predictable POST request returns a finished PDF or image. There is no headless browser to run and no rendering pipeline to keep alive.

Credit-based pricing. You only pay for conversions that succeed.

POST https://urltodoc.com/api/convert
{
  "url": "https://usethekeyboard.com/slack",
  "key": "sk_live_2f9c…",
  "format": "A4",
  "landscape": true,
  "javascript": true,
  "store": true
}

From request to file in three moves

01 / Request

Send the page

POST a URL or a raw HTML string with your key. Set the format, orientation, and whether scripts and images should run.

02 / Render

We print it

A real browser loads the page, waits for it to settle, and prints to your exact paper size. Same output every time.

03 / Receive

Get the file

The response streams back a PDF or image. Set store: true and we keep it and hand you a URL.

Control the output, one field at a time

Every option is a plain field in the request body, the same set the docs describe.

Field Type What it does
url string The page to capture. Send html instead to render raw markup.
format enum Paper size: A4, Letter, Legal, and the rest of the ISO and US sets.
landscape boolean Rotate the page to landscape orientation.
javascript boolean Run the page's scripts before printing, for content that builds on load.
images boolean Include images, or drop them for a lighter, faster file.
store boolean Keep the file on our side and return a hosted URL in the response.

Every conversion, on the record

Review past calls, re-download any file, and top up credits from one dashboard.

The urltodoc dashboard listing recent conversions with their status and stored files

app.dashboard · recent conversions

Common questions

Do I need to write code to use it?

Yes. You integrate over HTTP, so any language that can make a request works. The documentation covers auth, the request body, and copy-paste examples.

Can I render to images, not just PDF?

Yes. The same request returns PNG or JPEG when you ask for an image format instead of a PDF.

How is pricing calculated?

Credits. One successful conversion spends one credit, and failed requests are not charged. You buy more from your account whenever you run low.

Which payment methods do you accept?

Billing runs through Stripe with major cards. For anything else, get in touch and we will sort it out.

Ship your first PDF in minutes.

Create an account, copy your API key, and run a conversion. Free to start.