CruxDevCruxDev Tools Prompts
file Utility • Zero-Server Privacy • 100% Client-Side

PDF Page Splitter

Extract specific pages or page ranges from a PDF and download as a new file.

Overview

Extract specific pages from a PDF into a new document using a simple range syntax - 1-3, 5, 8-10 - with live validation as you type. The new PDF is built with pdf-lib entirely in your browser and downloads immediately. Useful for pulling a chapter out of a report, splitting a scan, or sending only relevant pages.

How It Works

Drop a single PDF; its page count appears so you know the valid range. Type the pages to extract using commas and hyphens: single pages (5), ranges (1-3) or a mix. Validation runs as you type - out-of-range pages, reversed ranges and syntax errors are reported immediately next to the field. Leave the field empty to extract all pages. Press the split action and a new PDF named after the original with an -extracted suffix downloads containing exactly the selected pages in ascending order.

Step-by-Step Usage Guide

  1. Drop the PDF and note its page count.
  2. Type the pages or ranges to extract, for example 1-3, 5, 8-10.
  3. Fix any validation error shown beside the field.
  4. Split and download the new -extracted PDF.

Technical Specifications & Standards

The range parser is strict and transparent: it splits on commas, then on hyphens, requires 1-based numbers within the document's page count, rejects start-greater-than-end ranges, and collects results into a set so duplicates entered twice extract once. The parsed set is sorted ascending, so the output page order follows the source document rather than the order you typed - typing 9, 1-3 yields pages 1 through 4, not 9 first. Extraction copies the selected pages into a fresh PDFDocument rather than trimming the original, which preserves each page's own size, rotation and resources without touching the source file in memory. Because a new document is built, annotations and form fields attached to extracted pages generally come along, but document-level features - bookmarks, metadata, attachments - do not, since they belong to the original file rather than its pages. Encrypted PDFs hit the same limits as the merger tool: structure may load, protected content cannot be decrypted here.

Targeted Use Cases

  • Extracting a single chapter or section from a long report.
  • Pulling the signed pages out of a large contract for separate filing.
  • Splitting a combined scan into per-document files.
  • Sharing only the relevant pages of a large PDF over email.

Notes & Gotchas

  • Check the shown page count before typing ranges; validation is 1-based.
  • Remember output order follows the document, not your typing order.
  • Duplicate pages in the input are extracted once, not twice.
  • Bookmarks and metadata stay with the original; the extracted file is pages only.

Frequently Asked Questions

What range syntax is accepted?

Comma-separated single pages and ranges: 5, 1-3, 8-10. Validation is live and reports out-of-range numbers, reversed ranges and syntax errors immediately.

Why did 9, 1-3 produce pages in a different order?

The extracted pages are sorted ascending before building the new PDF, so output follows the source document's order rather than the order you typed.

What happens if I leave the range empty?

All pages are extracted, producing a copy of the document as a new file.

Are bookmarks and metadata carried over?

No. The new PDF contains the copied pages; document-level items like bookmarks, metadata and attachments belong to the original file.