Split PDF
Merge & Split → Split PDF
The Split PDF API splits a PDF into multiple documents. You send the PDF (docContent Base64, docName), splitAction (SplitAfterPage, RecurringSplitAfterPage, SplitSequence, SplitRanges), and the corresponding parameters (splitActionNumber, splitSequence, splitRanges), optional fileNaming, and async. The API returns an array of split PDFs. Use the tester below to try it; more details are in the sections that follow.
Try the Split PDF API
Endpoint: POST /api/v2/SplitPdf · Required: api-key, docContent, docName, splitAction
Use the form below to send your API key, PDF (Base64), and split action (page-based, recurring, sequence, or range). The response is an array of split PDFs. No code required, fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Split PDF?
This endpoint splits a PDF into multiple documents. You choose splitAction: SplitAfterPage (split after a specific page), RecurringSplitAfterPage (split every N pages), SplitSequence (split at specific page numbers), or SplitRanges (extract specific page ranges). Use splitActionNumber, splitSequence, or splitRanges as needed. The API returns an array of split PDFs.
Split action types
- SplitAfterPage: Split after a specific page number.
- RecurringSplitAfterPage: Split every N pages.
- SplitSequence: Split at specific page numbers (e.g. 1, 3, 8).
- SplitRanges: Extract specific page ranges (e.g. 1-4).
Use when dividing a PDF by page count or ranges. For splitting by content use Split PDF by Text, Split PDF by Barcode, or Split PDF by Swiss QR.
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64). |
| docName | string | Yes | Input PDF file name (e.g. sample.pdf). |
| splitAction | string | Yes | SplitAfterPage, RecurringSplitAfterPage, SplitSequence, or SplitRanges. |
| splitActionNumber | integer | No | Page number (SplitAfterPage) or every N pages (RecurringSplitAfterPage). |
| splitSequence | array | No | Page numbers to split at (SplitSequence). |
| splitRanges | string | No | Page ranges (SplitRanges), e.g. 1-4. |
| fileNaming | string | No | File naming convention (e.g. NameAsPerOrder). |
| async | boolean | No | Enable asynchronous processing. |
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF file in Base64 format
Response Format
The API returns an array of split PDF documents, each containing the specified pages.