🛠️

PDF Split

Split a PDF into individual pages or page range groups

POST 1 credit /pdf/split
curl -X POST "https://pdf.toolkitapi.io/pdf/split" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://toolkitapi.io/document.pdf",
    "pages": "1-3,5,8-10"
  }'
import httpx

resp = httpx.post(
    "https://pdf.toolkitapi.io/pdf/split",
    json={
    "url": "https://toolkitapi.io/document.pdf",
    "pages": "1-3,5,8-10"
  },
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/pdf/split", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://toolkitapi.io/document.pdf",
    "pages": "1-3,5,8-10"
  }),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "parts": [
    {
      "pages": "1-3",
      "pdf": "JVBERi0xLjcK...",
      "page_count": 3,
      "file_size": 84521
    },
    {
      "pages": "5",
      "pdf": "JVBERi0xLjcK...",
      "page_count": 1,
      "file_size": 32104
    },
    {
      "pages": "8-10",
      "pdf": "JVBERi0xLjcK...",
      "page_count": 3,
      "file_size": 78932
    }
  ],
  "total_parts": 3,
  "source_page_count": 12
}

Description

Split a PDF into individual pages or page range groups

How to Use

1

1. Provide the source PDF via `pdf` (base64) or `url` (public URL).

2

2. Specify the `pages` parameter with your desired page ranges. Use "all" for individual pages, or comma-separated ranges like "1-3,5,8-10".

3

3. Send the POST request and iterate over the `parts` array in the response. Each part contains a base64-encoded PDF.

4

4. Decode each part's `pdf` field to save the individual split documents.

About This Tool

PDF Split breaks a PDF document into separate parts based on page ranges you specify. Use this tool to extract specific pages or divide a large document into smaller, more manageable sections.

You can split into individual pages by using "all", or define custom page ranges like "1-3,5,8-10" to create grouped parts. Each part is returned as an independent PDF with its own page count and file size.

Why Use This Tool

Frequently Asked Questions

What does "all" do for the pages parameter?
Setting pages to "all" splits the PDF into individual single-page documents — one part per page.
Can I use overlapping page ranges?
Yes, the same page can appear in multiple parts. For example, "1-3,2-5" would create two parts with pages 2 and 3 appearing in both.
Is there a limit on the number of pages?
There is no hard page limit, but very large documents may take longer to process. The endpoint handles typical business documents (hundreds of pages) without issues.

Start using PDF Split now

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