Skip to content
Encoding2026-10-14Begin4 min read

How to Split a PDF and Extract Pages: Range Syntax, Common Cases, and a Local Workflow

"Just pages 2–5 of this PDF." "Break this scan into chapters." Splitting comes up in organizing work even more often than merging. This post covers the de facto range syntax, four typical split patterns, and how to get it all done without installing anything.

Range syntax: one shared convention

Mainstream tools (including ToolVault PDF Split) all accept this notation:

1-3,5      → pages 1, 2, 3 in one file; page 5 in another
1,3-4      → page 1 in one file; pages 3, 4 in another
(left blank) → page-by-page split: each page becomes its own file

Three classic mistakes:

  1. Pages are 1-indexed, not 0 — writing 0 errors out immediately. That's a guard rail, not a bug.
  2. Ranges are inclusive: 3-5 covers pages 3, 4, and 5.
  3. Out-of-bounds must error: a 10-page document given 5-12 should be rejected. A tool that silently truncates leaves you believing you got the full range.

Four typical splits

Case 1: you only need a middle section

Signature pages sit at 7–9? Type 7-9, download a single file. This is by far the most common use.

Case 2: page-by-page archival

Leave the range blank to split every page into its own file — the go-to when archiving scanned receipts and invoices page by page. A page-number suffix in the filename (-p3) is a courtesy any decent tool should offer.

Case 3: split then merge = rearrange

To move chapter 5 after chapter 2: split out 1-4, 9-12, and 5-8 as three segments, then merge them in the new order (PDF Merge). Both steps run locally in the browser; the file never leaves the device mid-workflow.

Case 4: batch-splitting many files

The command line fits better here: run qpdf input.pdf --pages . 1-3 -- out1.pdf in a loop. Browser tools are positioned for occasional, interactive work.

Why a split tool, of all things, should run locally

What gets split is usually medical records, court judgments, transcripts, IDs — and extracting pages from those documents means handing a tool your most sensitive fragments. Server-side splitting sites (most free online tools) upload the entire file, which is the worst possible privacy trade: the full document goes up, and you walk away with only a small piece of it.

The verification method doesn't change: DevTools Network panel, drop a file in, zero requests = genuinely local. ToolVault PDF Split is built to that standard.

FAQ

A split page won't open? That page's resource dictionary may carry cross-page references in the original — rare. Run the file through qpdf once to tell whether the problem is the tool or the file.

Two ranges into one output file? 1-2,5-6 produces two files by default. To get "pages 1, 2, 5, and 6 in a single file," do split + merge as two steps — folding it into one step muddies what a range means.

Performance with hundreds of pages? A few-hundred-page PDF split page by page yields a few hundred small files — browser memory is fine, but managing the downloads is misery. Split by chapter ranges instead.

Implementation notes

Range parsing looks trivial; the edges are all traps: 3-1 (reversed range), 1-1 (degenerate single-page range), empty segments (1,,2), and full-width digits mixed in. (That last one: Chinese input methods can type digits as full-width Unicode characters — 123 instead of 123 — which look nearly identical on screen but aren't the ASCII digits a parser expects.) Build the parser as a pure function and exhaustively cover these edge cases with tests; it's far cheaper than patching at the UI layer. One more trade-off: the output filename base — the original filename plus a -p{range} suffix stays traceable across repeated operations; output1.pdf does not.

Bottom line

For occasional splits, use a browser-local tool (ToolVault PDF Split); for scripted batches, qpdf; for rearranging, split + merge in two steps. Remember three things about range syntax — 1-indexed, inclusive, out-of-bounds errors — and no tool will trip you up.