File & PDF Tools

Split PDF

Extract a page range into one PDF or individual PDFs in a ZIP.

Split PDF
Extract a page range into one PDF or individual PDFs inside a ZIP.
Local browser processing

Split PDF

Select pages with syntax such as 1-3,5,8. Save one combined PDF or package one PDF per page in a ZIP.

Output Rules

  • Page numbering starts at 1
  • Descending ranges such as 5-3 are supported
  • Duplicate selections keep their first occurrence

Split PDF extracts a page selection from one PDF into a new document: either a single PDF in the chosen order, or one single-page PDF per page packed into a ZIP. Parsing and writing happen locally with pdf-lib, so the source is never uploaded and stays untouched.

How the page expression is parsed

The whole expression is split on commas and every token must match ^(\d+)(?:\s*-\s*(\d+))?$, which is why whitespace around the hyphen is tolerated and 1 - 3 means the same as 1-3. Numbers are 1-based and both ends of a range are inclusive. Validation is all-or-nothing: a single token above the document page count throws before any bytes are written, so you get either a complete file or a range error, never a half-built PDF. The field is prefilled with the entire document — 1-8 on an eight-page file — so pressing the button without editing it rebuilds every page into a fresh PDF rather than doing nothing.

Pages are copied as objects, not re-rendered

Each selected page is transferred with pdf-lib copyPages, which moves the page dictionary together with its content streams, fonts, and images. Nothing is rasterized or resampled, so text remains selectable and vectors stay sharp. What does not travel is anything stored at document level: the output starts from PDFDocument.create, so the source Title and Author come back empty, /Outlines and /PageLabels vanish from the catalog, and a form field tree is left behind while its /Widget annotations are still copied onto the page — the boxes are visible but cannot be filled. The new file reports pdf-lib (https://github.com/Hopding/pdf-lib) as Producer and Creator.

ZIP naming and the resource duplication cost

Combined mode downloads <source>-split.pdf; per-page mode downloads <source>-pages.zip, whose members carry the source page number zero-padded to three digits, so 1-3,5,8 yields page-001.pdf, page-002.pdf, page-003.pdf, page-005.pdf and page-008.pdf; the gaps point back at the original pages, and past page 999 the three-digit padding stops sorting correctly. The archive is written by fflate zipSync at deflate level 6, which saves little because PDF streams are already Flate-compressed. The real cost is duplication: each member is a complete PDF holding its own copy of shared resources, so a 30-page test file of 365,726 bytes sharing one 360 KB image expands to roughly 10.8 MB across 30 single-page files.

Worked example

Splitting 1-3,5,8 out of an eight-page file

Input
report.pdf, 8 pages, page field 1-3,5,8, output set to one PDF per page (ZIP)
Output
report-pages.zip holding page-001.pdf, page-002.pdf, page-003.pdf, page-005.pdf and page-008.pdf (five PDFs of 847 to 848 bytes, 4,129 bytes in the archive)

Members keep their source page numbers, so page-004, page-006 and page-007 are missing rather than renumbered 1 to 5. The same expression in combined mode produces one five-page order: 1, 2, 3, 5, 8, saved as report-split.pdf. The ZIP is only marginally smaller than the 4,237 bytes of its members, because each single-page PDF is itself a deflated PDF.

Limits and pitfalls

  • Split mode reads only the first selected file; reading also stops at 100 MB per file and 250 MB across a selection.
  • Password-protected or encrypted PDFs are rejected outright, because there is no decryption step in the page-copy path.
  • Repeated page numbers are dropped silently, so 1-3,3 outputs three pages and not four; to repeat a page, extract it once and merge the copies.
  • Bookmarks, page labels, and AcroForm fields are lost in the rebuild, and widgets left on copied pages cannot be filled.
  • Combined output is always named <source>-split.pdf with no page range in it, so two splits of one document are indistinguishable by filename.

Related tools

When it goes wrong

I pasted a range copied out of Word and the bar says the page syntax is invalid, even though 1-3 is obviously a range.

CauseThe field is cut on commas and every piece is judged by ^(\d+)(?:\s*-\s*(\d+))?$, a pattern that knows only the ASCII hyphen-minus and the digits 0-9, so an en dash, an em dash or a full-width digit leaves the piece unmatched. A full-width comma is worse: the expression is split on the ASCII comma alone, so 1-3,5 never becomes two tokens and the whole string fails.

FixRetype the field with half-width characters, e.g. 1-3,5. Text lifted from a spreadsheet cell or a PDF text layer carries the same typographic dashes in.

I emptied the page field to see what would happen and it rebuilt all 300 pages instead of complaining.

CauseA blank expression is not an error in split mode. parsePageSelection runs with defaultAll still true and returns every page index, so an empty box means the entire document. Remove pages is the only mode that passes defaultAll:false, which is why the same empty box throws there.

FixType the range explicitly, e.g. 4-9. To get a one-page PDF, name that one page rather than relying on the field being empty.

One of my files puts the literal word EMPTY_PDF in the red bar instead of a sentence.

CauseThe loader aborts with EMPTY_PDF when the parsed document reports zero pages, and friendlyFileError has no branch for that code, so the raw string reaches the UI. The bytes did parse, so this is not the extension gate: the file reports a page tree whose Kids array is empty, which a reader may show as a blank document.

FixOpen it in a desktop reader to see whether it really is empty; if it is, re-export from the source application (Print to PDF again rather than copying the file), and run qpdf --check file.pdf first if you want to know whether the page tree survived.

Splitting a long scan into one PDF per page froze the tab, then it crashed before the ZIP ever appeared.

CauseThat branch builds every single-page PDF first, holds all of their bytes in one entries object, then deflates the whole set with zipSync before a Blob exists; nothing streams to disk, and the parsed source document stays in memory the whole time. Page count has no cap here, only file size does.

FixUse One PDF with a chapter-sized range and run the split two or three times, or keep the ZIP for short selections; the 100 MB ceiling applies to the source file, not to the number of members.

A PDF I saved from a web viewer is 12 KB and still gives me the generic cannot-read-this-file message.

CauseThe file gate only checks the .pdf suffix and the MIME type, and a browser-saved login or error page satisfies both. Parsing then fails on the magic number: a real file begins with %PDF- followed by a version such as 1.7, and friendlyFileError maps a header failure to its generic branch rather than to a page-range one.

FixCheck the first bytes with head -c 5 report.pdf; without %PDF- you downloaded HTML. Sign in first, then fetch it again with curl -L -o report.pdf.

One concrete scenario

Handing a reviewer two chapters of a 320-page manual

A 320-page service manual has to reach a reviewer as chapters 3 and 7 only. Chapter 3 spans pages 41-96 and chapter 7 spans 205-268, so the field reads 41-96,205-268: 56 + 64 = 120 pages come out as one manual-split.pdf in written order, and the page the reviewer sees as 1 of 120 is page 41 of the manual. Switching to One PDF per page turns the same expression into 120 members, page-041.pdf through page-268.pdf, each a complete PDF carrying its own copy of the shared fonts and figures. Take combined mode for a review hand-off; reach for the ZIP only when every page has to land in its own upload slot, and size the source against the 100 MB single-file read limit first.

Frequently Asked Questions

How do I read 1-3,5,8?
Commas separate selections; hyphens are ranges: 1-3 is pages 1, 2, 3, plus page 5 and page 8 — five pages. Descending ranges like 5-3 are also valid (pages 5, 4, 3). Numbering starts at 1, matching what your reader shows.
One file per page is too granular — can I group by chapter?
The tool outputs either one merged PDF or one file per page zipped. For chapter grouping (1-10, 11-20), run the split twice, each time merging one range into its own document.
Will splitting harm the original file?
No. Processing happens in browser memory; the original is neither modified nor uploaded, and outputs are brand-new PDFs — experimenting with different splits is safe.

Content reviewed: