Convert PDF to JPG
Send a PDF, get back one JPG per page — rendered exactly as a reader would see it, fonts, vectors, tables and all. This pdf to jpg api handles the messy internals of page rendering so you can turn any document into thumbnails, previews or image pipelines without shipping a headless renderer of your own.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The problem it solves
A PDF describes how to paint a page, not a picture of one. To see it you need a rendering engine that resolves embedded fonts, subsetted glyphs, vector paths, transparency and color profiles pixel-correct — a genuine engineering project to build in-house. This endpoint hands you the finished pixels instead: submit a document and receive one flattened JPG per page, ready for a preview grid, an image classifier, an OCR feeder, or anywhere a raster beats the source file.
How it works
You POST your PDF to /pdf/to-images and immediately get a task_id — rendering runs asynchronously so a heavy hundred-page document never blocks your request. Each page is rasterized at your chosen resolution and encoded as JPG. When the job finishes, we deliver the results to your signed webhook (the recommended path) or you fetch them from a signed link that stays valid for 24 hours. Because the work is queued, a spike of documents drains smoothly rather than timing out on you.
Why JPG, and when
PDF grew out of PostScript to make documents look identical everywhere; JPG came from the JPEG committee to compress continuous-tone imagery efficiently. Pairing them is deliberate: JPG keeps thumbnails and previews small and fast to move over a network — exactly what you want for galleries, email attachments, or feeding a vision model. For pages that are mostly sharp text or line art, a lossless format avoids compression artifacts, but for human-viewable previews JPG is the pragmatic winner.
Fitting it into automation
The async, webhook-first design is built for pipelines, not for a human clicking a button. A document lands in your storage, a function calls this endpoint, and minutes later your webhook receives the rendered pages and moves them to the next stage — a preview cache, an OCR queue, a moderation step. Every task is idempotent from your side: you hold the task_id, we do the retries. Failed renders get three attempts with backoff before returning a clear error, and a task that ultimately fails is never billed.
Pricing and access
The price is published and simple: $0.040 per request plus $0.001 per page, so a ten-page PDF costs five cents and you know the number before you send. Access needs an prepaid balance and a positive balance; without it the API returns 402 rather than silently queuing work. That paywall is intentional — no free tier means no scrapers clogging the queue, which is why legitimate documents come back fast. Your files are deleted after the retention window and never used to train anything.
What you can do with it
Document preview thumbnails
A contract-management app renders the first page of every uploaded PDF into a JPG thumbnail so users can eyeball a document in a list view without opening it.
Feeding a vision or OCR model
An intake pipeline rasterizes each page to JPG before handing it to an OCR or layout model that expects images, turning scanned and native PDFs into one uniform input stream.
Web galleries and flipbooks
A publisher converts a print-ready brochure into per-page JPGs to build a lightweight, swipeable web viewer that loads far faster than embedding the original PDF.
Email and chat previews
A support tool attaches a JPG of the relevant page inline in a ticket reply, so agents and customers see the exact clause being discussed without downloading the full file.
FAQ
How do I convert a PDF to JPG with an API?
POST your file to /pdf/to-images and you get a task_id back immediately. When rendering finishes, the pdf to jpg api delivers one JPG per page to your webhook, or you download them from a signed link valid for 24 hours.
Is there a free PDF to JPG API?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How much does it cost to convert a PDF to images?
It is $0.040 per request plus $0.001 per page. A 20-page document therefore costs six cents, and the number is fully predictable before you submit.
Can it convert every page of a multi-page PDF?
Yes — that is the default. Each page in the document is rasterized into its own JPG, and you are billed per page, so a single request handles the whole file.
Can I control the image resolution or quality?
Yes. You set the rendering resolution per request, so you can produce small fast thumbnails or high-DPI images suitable for OCR from the same endpoint.
What happens if a page fails to render?
The task retries three times with backoff. If it still cannot complete, you get a clear error and are not charged — failed tasks are never billed.
Should I use JPG or PNG for PDF pages?
JPG is best for previews and human-viewable pages where small file size matters. For pages that are mostly crisp text or line art, a lossless format avoids compression artifacts, though JPG wins for most common preview use cases.
How are the converted images delivered?
By a signed webhook, which we recommend for automation, or by a signed link that stays valid for 24 hours. After the retention window your files are deleted and never used to train anything.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/to-images \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"pdf":"https://ejemplo.com/documento.pdf"}'const res = await fetch("https://api.kit.forhosting.com/pdf/to-images", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"pdf": "https://ejemplo.com/documento.pdf"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/pdf/to-images",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"pdf": "https://ejemplo.com/documento.pdf"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/pdf/to-images", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"pdf":"https://ejemplo.com/documento.pdf"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"pdf":"https://ejemplo.com/documento.pdf"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/pdf/to-images", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"pdf": "https://ejemplo.com/documento.pdf"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "pdf.to_images",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
max_pages | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
413 | input_too_large | The file exceeds the size limit. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |