🧩

PDF to Images

Render PDF pages as PNG or JPEG images

POST 10 credits /v1/convert/pdf-to-images
curl -X POST "https://convert.toolkitapi.io/v1/convert/pdf-to-images" \
  -H "Content-Type: application/json" \
  -d '{"pdf": "<base64-pdf>", "pages": "1-3", "format": "png", "dpi": 200}'
import httpx

resp = httpx.post(
    "https://convert.toolkitapi.io/v1/convert/pdf-to-images",
    json={"pdf": "<base64-pdf>", "pages": "1-3", "format": "png", "dpi": 200},
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/pdf-to-images", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"pdf": "<base64-pdf>", "pages": "1-3", "format": "png", "dpi": 200}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "images": [
    {
      "page": 1,
      "image": "<base64-png>",
      "width": 1240,
      "height": 1754,
      "format": "png"
    },
    {
      "page": 2,
      "image": "<base64-png>",
      "width": 1240,
      "height": 1754,
      "format": "png"
    }
  ],
  "total_pages": 12,
  "rendered_pages": 2,
  "format": "png",
  "dpi": 200,
  "file_url": null,
  "file_name": null,
  "file_type": null
}

Description

Render PDF pages as PNG or JPEG images

How to Use

1

1. POST a JSON body containing the required `pdf` field.

2

2. Supply the optional parameters to fine-tune output.

3

3. When object storage is enabled, read `file_url` for a direct download; otherwise decode the Base64 `result` payload.

4

4. Inspect `page_count` (or equivalent) to confirm the full document was processed.

About This Tool

Rasterize PDF pages to PNG or JPEG at your chosen DPI. Great for thumbnails, previews, and feeding PDF content into image-based pipelines.

Why Use This Tool

Frequently Asked Questions

What DPI should I pick?
72–96 DPI for web thumbnails, 150–200 for on-screen preview, 300+ for print-quality rasterization.
Is the output batched as a ZIP?
When storage is enabled, yes — all rendered pages are returned as a single ZIP via `file_url`. Otherwise each image is inline in `images[]`.
Can I pick non-contiguous pages?
Yes — `pages` accepts ranges and single pages, e.g. `1-3,5,8-10`.

Start using PDF to Images now

Get your free API key and make your first request in under a minute.