Skip to content

Extract PDF Pages

Copy selected PDF pages into a new file in the exact order you specify.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Choose an unencrypted PDF no larger than 50 MiB and with no more than 500 pages.
  2. 2.Enter one-based page numbers or inclusive ascending ranges in the output order you want, such as 5, 1-3.
  3. 3.Extract the unique selected pages, review any duplicate-page notice, and download the new PDF.

About Extract PDF Pages

Extract PDF Pages creates a new PDF containing only the pages you select. Choose a local PDF, enter page numbers or inclusive ranges such as 1, 3-5, 8, and generate a separate downloadable file. The browser reads the original bytes and pdf-lib copies the requested page objects into a fresh document. The source file, page selection, and output are not uploaded to Lizely. A local source link lets you compare the original, and temporary source and result URLs are released when they are replaced or when the page closes.

Page numbers are one-based, matching the ordinary page numbers shown by PDF viewers. Commas or whitespace separate tokens, and a hyphen defines an inclusive ascending range. The token order is significant: 5, 2-3 produces original page 5 followed by pages 2 and 3. Descending ranges such as 5-3 are rejected rather than silently reversed. Decimal values, negative values, malformed ranges, and pages outside the loaded document are also rejected with an explicit error. The selection field accepts at most 4,000 characters; over-limit input is not truncated or partly applied.

Repeated pages follow a deliberate first-occurrence rule. For example, 3, 1-3 selects pages 3, 1, and 2. The second occurrence of page 3 is ignored, and the result reports that duplicate. This prevents an accidental overlapping range from silently adding repeated output pages while preserving the exact order in which each page first appeared. If you intentionally need duplicate pages, use a PDF page-reordering or duplication workflow designed for that purpose. Production and tests use the same strict parser and the same zero-based index list passed to pdf-lib.

The output page count equals the number of unique selected pages. A 90-degree rotation, crop box, media box, page graphics, and ordinary page resources are copied as part of each selected page object; the tool does not rasterize pages into screenshots. A real integration test builds source pages with different sizes and identifiers, extracts them through the production function, saves the result, reopens it, and verifies page count, output order, dimensions, and identity. This catches implementations that merely return the right number of pages while copying the wrong pages or sorting the user's order.

Important PDF features can have document-wide relationships that do not survive page extraction cleanly. Password-protected or encrypted files are not opened by bypassing encryption. Damaged or unsupported files can fail to load. Dynamic XFA forms are not a supported preservation target in pdf-lib. AcroForm fields, annotations, scripts, embedded files, layers, page labels, bookmarks, document outlines, cross-page destinations, and links may depend on objects outside the selected pages. Digital signatures will not remain valid after creating a different PDF. The tool therefore makes no promise that every interactive, navigational, signed, or archival property survives.

The input boundary is 50 MiB, or 52,428,800 bytes, and the decoded document boundary is 500 pages. These are explicit local-processing limits. A file at either boundary is accepted; a larger file or document is rejected, not shortened. The output can still be large because selected page resources such as fonts and images may be copied. File size does not necessarily scale in direct proportion to page count, and extracting one page from a resource-heavy document can retain data needed by that page. Browser memory availability can also vary by device and tab workload.

Changing the page expression immediately releases the previous result, and running extraction again replaces the previous output URL. Choosing another file clears the old bytes, selection, source link, result, and error. Job and mounted-state guards prevent an older asynchronous load or save from replacing newer state. Before using the output, open it in your target viewer, confirm the selected order and page appearance, test required links or fields, and retain the original PDF. Use a specialist PDF editor when preservation of signatures, XFA, accessibility structure, portfolios, attachments, or regulated archival conformance is required.

Methodology & sources

The browser validates PDF MIME or extension and a 50 MiB byte limit, then pdf-lib loads the source without ignoreEncryption. Documents must contain 1 through 500 pages. The parser accepts comma- or whitespace-separated one-based integers and inclusive ascending ranges, preserves token order, and keeps only each page's first occurrence while reporting later duplicates. The production extractor loads the original bytes, validates the zero-based unique indices, creates a new PDFDocument, copies pages in the parsed order, saves it, and exposes the new bytes through a temporary local Object URL.

Frequently asked questions

Can I control the order of extracted pages?
Yes. Token order becomes output order, so 5, 2-3 creates a PDF containing pages 5, 2, and 3 in that order.
What happens when a page is selected more than once?
The first occurrence is kept, later occurrences are ignored, and the result reports the repeated page numbers.
Can this tool open password-protected or XFA PDFs?
It does not bypass encryption, and dynamic XFA behavior is not a supported preservation target. Use the original authoring software for those documents.
Are my PDF pages uploaded?
No. Reading, page parsing, copying, saving, source preview linking, and download preparation happen in the current browser.

PDF Tools guides

View all