🧩

PDF to EPUB

Convert a PDF document to a reflowable EPUB ebook

POST 10 credits /v1/convert/pdf-to-epub
curl -X POST "https://convert.toolkitapi.io/v1/convert/pdf-to-epub" \
  -H "Content-Type: application/json" \
  -d '{"pdf": "<base64-pdf>", "title": "The Great Report", "author": "Jane Author"}'
import httpx

resp = httpx.post(
    "https://convert.toolkitapi.io/v1/convert/pdf-to-epub",
    json={"pdf": "<base64-pdf>", "title": "The Great Report", "author": "Jane Author"},
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/pdf-to-epub", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"pdf": "<base64-pdf>", "title": "The Great Report", "author": "Jane Author"}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "epub": "<base64-epub>",
  "page_count": 142,
  "file_size": 421888,
  "file_url": null,
  "file_name": "output.epub",
  "file_type": "application/epub+zip"
}

Description

Convert a PDF document to a reflowable EPUB ebook

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 `epub` payload.

4

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

About This Tool

Extract the text and images from a PDF and package them as a reflowable EPUB. The result is readable on e-ink devices, mobile readers and reading apps.

Why Use This Tool

Frequently Asked Questions

Is layout preserved?
EPUB is a reflowable format — fixed PDF layouts are not preserved. Text flows according to the reader's font and device.
Can I set a cover image?
The first page of the PDF is used as the cover image automatically.
What about scanned PDFs?
Scanned PDFs without a text layer yield an image-only EPUB. Run OCR on the PDF first for a textual EPUB.

Start using PDF to EPUB now

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