Split PDF

Split PDF API

File Tools

Split a PDF into separate files: extract the pages you pick, cut it into custom ranges, or every N pages. Runs in your browser, so nothing is uploaded.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

20 requests per minute

Endpoints

1 endpoint available

Overview

Split one PDF into several. Three modes:

  • ranges: one output file per comma-separated range, e.g. 1-3, 4-6, 7-.
  • pages: the listed pages in one file, in page order. With separate=true, one file per page.
  • every: chunks of N pages.

Response

One output comes back as a PDF (application/pdf). Several come back as a ZIP (application/zip) with files named like report-pages-1-3.pdf and report-page-4.pdf.

Limits

  • One PDF up to 25 MB and 500 pages. The outputs can hold at most 500 pages in total.
  • Pages that don't exist, password-protected or damaged PDFs return 422.

Endpoints

POST
https://opentools.ca/api/v1/tools/split-pdf
Split a PDF by ranges, selected pages, or every N pages

Request Body

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
file
file
Required
The PDF to split.
mode
string
Enum: ranges, pages, every
OptionalHow to split.Default: ranges
ranges
string
OptionalFor mode "ranges" (required there): comma-separated ranges, one output file each, e.g. "1-3, 4-6, 7-". "8-" runs to the end; a reversed range like "5-3" runs backwards.
pages
string
OptionalFor mode "pages" (required there): pages to extract, e.g. "1, 3, 5-7".
separate
boolean
OptionalFor mode "pages": "true" makes one file per page instead of one file with all of them.Default: false
every
integer
OptionalFor mode "every" (required there): pages per output file, 1 to 500.

Response Example

A PDF when there is one output (Content-Type: application/pdf), otherwise a ZIP of PDFs (Content-Type: application/zip, filename <name>-split.zip).

Error Codes

400
Bad Request - missing or invalid fields (see details)
401
Unauthorized - missing or invalid API key
403
Forbidden - API key inactive or expired, or request IP not allowed
413
Payload Too Large - a file is over 25 MB
415
Unsupported Media Type - the file is not a PDF
422
Unprocessable - the PDF is damaged or password-protected, has more than 500 pages, or a page number is out of range
429
Too Many Requests - more than 20 requests per minute for this key
500
Internal Server Error

Code Examples

# Three files: pages 1-3, 4-6 and 7 to the end
curl -X POST https://opentools.ca/api/v1/tools/split-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@report.pdf" \
  -F "mode=ranges" \
  -F "ranges=1-3, 4-6, 7-" \
  -o report-split.zip

# Every 2 pages
curl -X POST https://opentools.ca/api/v1/tools/split-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@report.pdf" \
  -F "mode=every" \
  -F "every=2" \
  -o report-split.zip

Ready to get started?

Create an API key to start using the Split PDF API.

Rather use it in your browser? Open the Split PDF