Skip to content
induwara.lk
Premium
induwara.lkDocuments · Privacy-first

Split PDF

Split a PDF into multiple files by page range, every N pages, or one PDF per page — fully inside your browser, no signup, no upload. Each output keeps the original pages byte-identical; nothing is re-rasterised. Sources cited.

By Induwara AshinsanaUpdated May 11, 2026
PDF SplitterIn-browser · no upload
Files stay on your device

Everything happens in your browser. Nothing is uploaded.

Built against the ISO 32000-2 PDF 2.0 specification, using pdf-lib for the page-tree surgery. Header, EOF, and plan integrity checks verified 2026-05-11 — full source list in the "Sources & references" section below.

How it works

A PDF file is, in spec terms, a body of numbered objects (pages, fonts, images, content streams) plus a cross-reference table that tells a reader the byte offset of each object. The page tree (ISO 32000-2 §7.7.3.2) is a shallow structure: a root /Pages dictionary points to /Kids (each a /Page object), and the catalog points to that root. To split a PDF you copy a subset of the page objects — together with everything they reference (fonts, images, resources, content streams) — into a fresh document and rebuild a single page-tree root over the lot. That is what this tool does for every output range.

The split is performed by pdf-lib, an MIT-licensed pure-JavaScript PDF library. It is loaded dynamically when you press Split — until then the page bundle stays small and your browser does not download the ~270 KB library. Inside the React component the flow is straight: PDFDocument.load(bytes) for the source, then for each output range a fresh PDFDocument.create() plus copyPages(src, [i..j]).addPage(...), and finally save() to serialise each output.

Before any pdf-lib work runs the tool does four deterministic things so the plan can be validated up front:

  1. Validate the source. Confirms the PDF MIME type, a non-zero size, and a per-file cap of 100.0 MB. The first 1 KB is scanned for the literal %PDF-n.m header (ISO 32000-2 §7.5.2), and the last 2 KB for the %%EOF terminator (§7.5.5). Files missing either are rejected with an explanation.
  2. Read the exact page count. pdf-lib parses the catalog and page tree and reports getPageCount(). That number is the ceiling for every range the user enters — an out-of-bounds range becomes an inline error before the split runs.
  3. Build a plan. The selected mode produces a list of output ranges. By-range mode parses the text expression; every-N mode walks for (start = 1; start ≤ total; start += N); each-page mode produces N ranges of one page each. Plans are capped at 500 output files.
  4. Cross-check the plan. The plan is summed two ways. First by arithmetic (end − start + 1, totalled), then by independent enumeration (a nested loop that adds 1 per page visited). The two totals must agree and every page must lie inside the source. If anything is off, the Split button is disabled with a specific error.
  5. Run the split. For each range, pdf-lib creates a destination document, copies the selected pages (preserving the original byte streams), writes a fresh catalog and trailer, and returns the merged byte buffer. Each buffer is wrapped in a Blob, exposed via an object URL, and offered to you as a download. No bytes leave the browser tab.

Choosing between the three modes

The three modes are not interchangeable, and picking the wrong one is the most common reason a split produces surprising output. Use by range when the document has meaning-bearing boundaries you already know — chapters, a single signed page, the two pages of a bank statement you actually need. It is the only mode where pages may be dropped: the outputs cover exactly the pages you name and nothing else. Use every N pages when the boundaries are regular rather than semantic — a scanned ledger where each record is four pages, or a long report you want in equal chunks small enough to email. Use each page when downstream software expects one file per page, which is the usual reason people split at all: bulk upload forms, per-page e-signing, and page-level archiving.

If what you actually want is the opposite operation — several PDFs combined into one — use the PDF Merger, which runs the same page-tree copy in reverse. If the pages come out sideways because the source was scanned in landscape, the PDF Page Rotator changes each page’s /Rotate entry without touching the content stream, so it can be run before or after a split with no quality cost either way.

Limits, caps, and version support

Three hard caps bound the work. A single source file may be up to 100.0 MB; a single split may produce at most 500 output files; and the range expression itself is capped at 4 KB of text, which is far more than any realistic comma list needs and stops a pathological paste from locking the parser. The output cap matters most in each-page mode: a 900-page scanned book would ask the browser to materialise 900 simultaneous object URLs, which every browser throttles. For jobs that large, split in two passes — first cut the source into a handful of range-based outputs, then split each of those further.

On the format side, inputs from PDF 1.4 through PDF 2.0 are accepted, which covers essentially every file produced since 2001. The version detected in the %PDF-n.m header is shown on the queued-file row, so an unusual input is easy to spot before you commit to a split. Outputs are always written as PDF 1.7, the pdf-lib default, and every reader released since 2008 reads that. Compressed cross-reference streams and object streams (§7.5.7 and §7.5.8, introduced in PDF 1.5) are handled by pdf-lib rather than by hand — that is precisely why the tool leans on a real parser instead of doing byte surgery on the file.

Edge cases the validator catches first

Range expressions are typed by hand, so most failures are typing failures. Each one is caught before pdf-lib is even loaded, and each produces a specific message rather than a generic “invalid range”:

  • 5-3 — a reversed range. Rejected, because silently swapping the endpoints would hide a typo that changes which pages you get.
  • 0-2 — page 0. PDF page numbers are 1-based throughout the spec and throughout this tool, so 0 is an error rather than a synonym for page 1.
  • 11 on a 10-page source — out of bounds. The page count read from the catalog is the ceiling for every range, so this fails before any copying starts.
  • 7-— an open-ended range. Valid, and resolves to pages 7 through the last page. This is the one case where a partial expression is deliberately accepted, because “from here to the end” is a common and unambiguous intent.
  • 1-1 or 10-10 on a 10-page source — boundary cases at the first and last page. Both valid, each producing one single-page output.
  • An every-N value equal to or greater than the page count — valid, and produces exactly one output containing the whole document. N = 1 is also valid and behaves identically to each-page mode.

Whatever the mode, the resulting plan is then summed twice by two independent routes: once arithmetically, as end − start + 1 totalled across ranges, and once by enumerating the plan page by page and counting visits. The two totals must agree and every page must lie inside the source. A disagreement would mean the plan builder and the page enumerator disagree about what was asked for, and in that case the Split button stays disabled rather than producing output nobody has verified.

What a split does not carry across

Each output is a genuinely new document, not a trimmed copy of the original, and that distinction decides what survives. Page-level content survives in full: text operators, vector graphics, embedded raster images, fonts, and annotations anchored to a page. Document-level structures do not, because they describe the old document rather than the new one — the outline (bookmark) tree, interactive form state held in the document’s AcroForm dictionary, document-wide JavaScript, and attachments. If a form matters, flatten it in your reader before splitting. Encrypted sources are refused outright rather than prompting for a password, since holding a password in browser memory would undercut the only promise this tool makes; remove the encryption first with the PDF Password Remover and split the clear copy.

Worked examples

Extract chapters by range

A 10-page PDF with three chapter starts at pages 1, 5, and 7. Extracting each chapter as its own file uses three ranges.

  1. Source: 10 pages · mode: Ranges: 1-3, 5, 7-9
  2. Output files (3): Pages 1–3 · Page 5 · Pages 7–9
  3. Pages copied: 7 of 10
  4. Pages 4, 6, and 10 are dropped — not every page has to belong to an output. Total pages copied = 3 + 1 + 3 = 7.

Every 5 pages of a 20-page report

A 20-page quarterly report split into four 5-page sections. Uses the 'every N pages' mode with N = 5.

  1. Source: 20 pages · mode: Every 5 pages
  2. Output files (4): Pages 1–5 · Pages 6–10 · Pages 11–15 · Pages 16–20
  3. Pages copied: 20 of 20
  4. ceil(20 / 5) = 4 outputs. Page counts are 5 + 5 + 5 + 5 = 20, matching the source exactly.

Every 7 pages of a 20-page handbook (non-divisible)

A 20-page staff handbook split into 7-page chunks. 20 is not a multiple of 7, so the last output is shorter.

  1. Source: 20 pages · mode: Every 7 pages
  2. Output files (3): Pages 1–7 · Pages 8–14 · Pages 15–20
  3. Pages copied: 20 of 20
  4. ceil(20 / 7) = 3. The last output has just 6 pages (15–20). Total copied = 7 + 7 + 6 = 20, no pages dropped.

Edge cases, worked step by step

The three examples above are the ordinary path. These three are the awkward ones — an open-ended range, an input the validator refuses, and a value that makes the split a no-op. Each is worked through with the same arithmetic the tool runs internally, so you can check the tool against the page.

Open-ended range on a 148-page scanned book

You want the front matter and the index of a 148-page scan, but you do not want to look up where the index ends. Range mode, input '1-10, 140-'.

  1. Chunk 1 is '1-10': an explicit range. Pages copied = 10 − 1 + 1 = 10.
  2. Chunk 2 is '140-': open-ended, so the right side resolves to the page count read from the catalog, 148. Pages copied = 148 − 140 + 1 = 9.
  3. Arithmetic total = 10 + 9 = 19. Independent enumeration visits pages 1…10 and 140…148, also 19. The two agree, so the plan is valid.
  4. Bounds check: the lowest page is 1 and the highest is 148, both inside 1…148. No range is reversed. Plan accepted.

Result: Two output files: a 10-page front-matter PDF and a 9-page index PDF. 129 pages (11–139) are dropped, which is the intended result — range mode never requires full coverage.

A reversed range is refused before any file is written

A typo turns '3-5' into '5-3' on a 10-page PDF. Range mode, input '1-2, 5-3'.

  1. Chunk 1 is '1-2': valid. Pages copied = 2 − 1 + 1 = 2.
  2. Chunk 2 is '5-3': start 5, end 3. The invariant start ≤ end fails, so no range is produced for this chunk.
  3. Because the parser returns errors rather than a partial plan, chunk 1 is discarded too: the plan is empty and the error list holds one entry naming '5-3' specifically.
  4. The Split button stays disabled and pdf-lib is never loaded — the ~270 KB library download does not even start.

Result: Zero output files, one specific error message suggesting '3-5'. The tool never silently swaps the endpoints, because a swap would quietly hand you pages you did not ask for.

Every N pages where N is larger than the document

A 20-page report, every-N mode, N = 25. A plausible thing to type when you have misremembered the page count.

  1. Output count = ceil(total ÷ N) = ceil(20 ÷ 25) = ceil(0.8) = 1.
  2. The loop runs 'start = 1', and the range end is min(start + N − 1, total) = min(25, 20) = 20. It then advances start to 26, which is past 20, so the loop stops.
  3. Plan = one range, pages 1–20. Arithmetic total = 20 − 1 + 1 = 20; enumeration also visits 20 pages. Valid.

Result: One output file containing all 20 pages — a copy of the source, page for page. Nothing is lost, but nothing is gained either. N = 1 sits at the opposite end and behaves exactly like each-page mode: 20 single-page files.

If the goal is images rather than page subsets — one PNG or JPEG per page instead of one PDF per page — the PDF to JPG converter does that in one step and skips the split entirely.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.