# Extract PDF Pages

URL: https://hifreetools.com/pdf/extract-pdf-pages

> Pull specific pages out of a PDF into a brand-new document — list pages and ranges like 1-3, 5, 8-10 — entirely in your browser, with no upload.

## Quick answer

To extract pages from a PDF, open it and list the pages you want, such as 1-3, 5, 8-10. The tool builds a new PDF containing only those pages, in the order you list them, and downloads it. Everything runs in your browser using pdf-lib, so the document is never uploaded. This is the opposite of deleting pages: you keep only what you select.

## Formula

- "a-b" = pages a to b inclusive (b < a runs backwards); "a-" = page a to the last page
- pages keep the order you list them; a page listed twice is kept once
- every page must be between 1 and the page count

The tool reads your page selection (single pages and ranges), validates it against the document's page count, then copies exactly those pages — in the order given — into a new PDF using pdf-lib's copyPages. The original is untouched; you get a fresh file containing only the chosen pages, preserving their original content and quality.

## Inputs

- PDF file (1 to 1) — one of: PDF
- Pages to extract; default 1-3
- Pages in the PDF (1 to 100000); default 10
- File name; default document.pdf

## Worked examples (computed by the page's own function)

- Pages to extract = 1-3, Pages in the PDF = 10, File name = report.pdf → Extracted PDF = report-extracted.pdf, Pages extracted = 3, Pages, in order = 1–3  (3 of 10 pages: 1–3)
- Pages to extract = 5, 1, 3, Pages in the PDF = 10, File name = report.pdf → Extracted PDF = report-extracted.pdf, Pages extracted = 3, Pages, in order = 5, 1, 3  (3 of 10 pages: 5, 1, 3)
- Pages to extract = 1-3, 5, 8-, Pages in the PDF = 10, File name = report.pdf → Extracted PDF = report-extracted.pdf, Pages extracted = 7, Pages, in order = 1–3, 5, 8–10  (7 of 10 pages: 1–3, 5, 8–10)

## Verification

Checked against 23 reference cases (expected values computed independently). Reviewed 2026-10-27. Latest change 2026-10-28: Moved to the schema file renderer with a sourced ledger. New: "8-" means page 8 to the end, and a reversed range such as 5-3 now gives pages 5, 4, 3 in that order (it used to be sorted to 3, 4, 5). The download is named after your file (report-extracted.pdf instead of extracted.pdf). The selection is no longer shortened to the page count when a short PDF is added; an out-of-range page is flagged instead.

## FAQ

**How do I extract pages from a PDF?**
Open the PDF, type the pages and ranges you want (e.g. 1-3, 5), and click Extract. A new PDF with only those pages downloads.

**Can I change the page order?**
Yes. The extracted PDF follows the order you list, so entering 5, 1, 3 puts page 5 first.

**Is my PDF uploaded?**
No. Extraction happens locally in your browser with pdf-lib; the file never leaves your device.

**How is this different from splitting?**
Elsewhere, splitting often means breaking a PDF into several files at once. Here, both Split PDF and this tool save the pages you choose as one new PDF; for several files, run it once per page range.

**Does it reduce quality?**
No. The selected pages are copied as-is, so text stays selectable and images keep their resolution.

**What if my PDF is password-protected?**
It must be unlocked first. Encrypted PDFs can't be read for extraction.


## Sources

- [pdf-lib — PDFDocument.copyPages](https://pdf-lib.js.org/docs/api/classes/pdfdocument)
- [Wikipedia — PDF](https://en.wikipedia.org/wiki/PDF)
- [Adobe — PDF 32000-1:2008 (ISO 32000-1) page tree](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Extract PDF Pages", https://hifreetools.com/pdf/extract-pdf-pages
