Split PDF by page range into a new file
Split PDF by page range when you need one continuous section of a larger document without sending, storing, or reviewing every other page.
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
Provide the source PDF, the first page, and the last page using familiar one-based numbering. The result is a separate PDF containing that inclusive range in its original order. The source remains unchanged, and an invalid range is rejected clearly instead of creating a partial or misleading file.
Choose an inclusive range with predictable page numbers
This tool treats the first page shown by a normal PDF viewer as page 1. Enter a start page and an end page, and both boundaries are included in the new file. Asking for pages 4 through 7 therefore produces four pages: 4, 5, 6, and 7. That simple rule avoids the zero-based indexing surprises common in programming libraries and makes an automated request match what a person sees on screen. Before splitting, check whether the document has a printed cover or unnumbered introductory pages, because printed folio numbers can differ from viewer page positions. The capability uses physical PDF page positions, not numbers printed inside the artwork. The start must be less than or equal to the end, and both values must be positive integers. If either boundary exceeds the source document page count, the request returns an input error. It never silently clamps a range, substitutes the last page, or produces an incomplete file that could be mistaken for the requested section.
Understand what the splitter returns
A successful request creates a new PDF containing only the pages inside the selected continuous range. The original input is not edited, so it can be used again for another range or kept as the authoritative document. Alongside the new PDF, the response reports the source page count, the number of extracted pages, and the accepted start and end values. Those fields make automated checks straightforward: a workflow can confirm that pages 12 through 18 yielded seven pages before attaching the result to a case, customer record, or email. The operation is deterministic, with no network request, random choice, model inference, or current-time dependency in the splitting logic. The browser version runs the same core algorithm as the API handler. This capability is intentionally for one continuous interval. If a task needs scattered pages, reordered pages, or several output files, use a page extraction, reordering, or general splitting workflow designed for that different selection model.
Build safe document workflows around range validation
Range validation matters most when page numbers come from another system. An index may say that an invoice occupies pages 31 through 34, while a later scan has only 30 pages because an upload was truncated. Generating pages 31 through 34 as an empty or shortened result would hide the upstream problem. This splitter instead compares both boundaries with the parsed page count and fails the request when the range is outside the document. Treat that error as a signal to quarantine the file, refresh the index, or ask for a complete upload. For interactive use, verify the viewer page count and retry with valid boundaries. For API use, log the requested range and returned page count without logging the document itself, especially when PDFs contain personal or financial material. Billing is simple: each API request costs $0.002, while the browser execution is available locally. Because the result is a separate file, give it a descriptive filename that records the source identifier and range for later auditing.
What you can do with it
Separate one contract section
Create a new PDF containing the appendix pages requested by a reviewer without sharing the unrelated commercial terms in the full agreement.
Route an invoice from a batch
Use page boundaries stored by an indexing step to split one vendor invoice from a combined monthly scan and attach it to the correct record.
Share a report chapter
Extract a continuous chapter from a long technical report so a teammate receives a focused, smaller document while the master file remains unchanged.
FAQ
Are the start and end pages included?
Yes. The range is inclusive, so pages 3 through 5 produce a three-page PDF containing pages 3, 4, and 5.
What happens if the range exceeds the PDF page count?
The request fails with an invalid input error that includes the document page count. No partial PDF is returned.
Does splitting change the original PDF?
No. The selected pages are written to a new PDF, and the source value is never modified.
Can I request nonconsecutive pages?
No. This capability accepts one continuous range. Use a page extraction tool when you need separate or reordered page numbers.
How much does it cost?
The API price is $0.002 per request. The browser version can run the same deterministic operation locally.
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, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/split-by-range \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"pdf":"https://ejemplo.com/documento.pdf","start_page":1,"end_page":2}'const res = await fetch("https://api.kit.forhosting.com/pdf/split-by-range", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"pdf": "https://ejemplo.com/documento.pdf",
"start_page": 1,
"end_page": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/pdf/split-by-range",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"pdf": "https://ejemplo.com/documento.pdf",
"start_page": 1,
"end_page": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/pdf/split-by-range", 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","start_page":1,"end_page":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"pdf":"https://ejemplo.com/documento.pdf","start_page":1,"end_page":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/pdf/split-by-range", 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",
"start_page": 1,
"end_page": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "pdf.split_by_range",
"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. |