Back to Blog
PDF Tools

How to Split a PDF: By Page, By Size, and By Bookmark

PDF-Builder Team·

How to split a PDF: by page, by size, and by bookmark

You have a 90-page report but only need pages 12 through 18. Or a 40 MB scanned document that's too large to email. Or a textbook with chapter bookmarks and you want each chapter as its own file.

Each of these calls for splitting, but a different kind. The tools and steps depend on which kind you need.


Three ways to split (and when to use each)

By page range is the most common. You specify exact pages ("1-3, 5, 7-10") and get a new PDF containing just those pages. This is what most people mean when they say "split a PDF."

By file size sets a maximum size per output file. The tool creates as many files as needed to stay under the limit. Useful when you need to email a large PDF but can't exceed 25 MB per attachment.

By bookmark splits at PDF bookmark boundaries. If your document has a table of contents with bookmarks pointing to chapter starts, this produces one file per chapter. It only works on PDFs that have bookmarks.

Split typeBest forRequirementsTool support
Page rangeExtracting specific sectionsKnow which pages you needAll tools
File sizeMeeting upload/email limitsKnow the target sizePDFsam, CLI, some online tools
BookmarkStructured documentsPDF must contain bookmarksPDFsam, CLI, Adobe Acrobat

Method 1: Online tools

Online tools handle page-range splitting. Upload your PDF, select pages, download the result.

Using iLovePDF as an example:

  1. Go to ilovepdf.com/split_pdf
  2. Upload your PDF
  3. Choose "Split by range" and enter the page numbers (e.g., "1-3, 7-10")
  4. Click "Split PDF"
  5. Download the output files

Most online tools only support page-range splitting. Bookmark and file-size splitting require desktop software or command-line tools.

Free tier limits apply. Smallpdf gives you 2 free tasks per day. iLovePDF allows 1 task per hour. These caps are the same across all their PDF tools.

Your files get uploaded. The same privacy tradeoff applies here as with any online PDF tool. For non-sensitive documents, that's fine. For contracts, tax returns, or medical records, consider a local option. See our guide on PDF tool privacy for more on what happens to uploaded files.


Method 2: Desktop software

Desktop applications split files on your computer without uploading anything.

PDFsam Basic

PDFsam Basic is open-source and runs on Windows, Mac, and Linux. It supports all three split types, which makes it the most capable free option for splitting.

Splitting by page range:

  1. Download PDFsam Basic from pdfsam.org
  2. Open the app and select "Split by bookmarks" or "Split"
  3. Add your PDF
  4. Enter page ranges or select a split method
  5. Choose an output location and click "Run"

PDFsam also supports splitting every N pages (e.g., every 5 pages), which is useful for breaking a long document into uniform chunks.

Splitting by bookmark: Select "Split by bookmarks," choose the bookmark level (top-level chapters or sub-sections), and run. Each bookmark boundary becomes a separate file.

Splitting by size: Select "Split by size" and enter the maximum file size. PDFsam adds pages to each output file until it approaches the limit, then starts a new file.

PDF24 Creator

PDF24 Creator (Windows) includes split and extract tools. You can split by page range or extract individual pages. The interface shows page thumbnails so you can visually confirm your selection.

Adobe Acrobat Pro

Adobe Acrobat Pro (paid, $20/month) supports all three split types. If you already have a subscription, it works well. It's not worth subscribing to just for splitting when free tools handle it.

For a broader comparison of these and other tools, see our best free PDF tools guide.


Method 3: Browser-based local tools

Browser-based local tools look like online tools but process files in your browser. Your PDF never leaves your device.

PDF-Builder works this way. You can split PDFs by entering page ranges, clicking split, and downloading the results. No upload, no account, no file size limit.

This is the middle ground between online tools (convenient but upload your files) and desktop software (private but requires installation). You get both convenience and privacy, the same way browser-based tools handle merging and compression.


Method 4: Command line

Command-line tools give you the most control and are the best option for automation.

Ghostscript: split by page range

Extract pages 5 through 10:

gs -sDEVICE=pdfwrite -dFirstPage=5 -dLastPage=10 -dNOPAUSE -dBATCH -sOutputFile=pages5-10.pdf input.pdf

Ghostscript is free and already installed on many Linux and Mac systems. On Windows, you can install it from ghostscript.com.

Python with pypdf: split by page range

from pypdf import PdfReader, PdfWriter

reader = PdfReader("report.pdf")
writer = PdfWriter()
for page in reader.pages[4:10]:  # pages 5-10 (zero-indexed)
    writer.add_page(page)
writer.write("pages5-10.pdf")

This gives you programmatic control. You can loop through a list of ranges and produce multiple output files in one script.

Python with pypdf: split by bookmark

from pypdf import PdfReader, PdfWriter

reader = PdfReader("textbook.pdf")
outlines = reader.outline

def get_page_number(reader, destination):
    return reader.get_destination_page_number(destination)

# Collect bookmark page numbers
bookmark_pages = []
for item in outlines:
    if isinstance(item, list):
        continue  # skip nested bookmarks
    page_num = get_page_number(reader, item)
    bookmark_pages.append((item.title, page_num))

# Split at each bookmark
for i, (title, start) in enumerate(bookmark_pages):
    writer = PdfWriter()
    end = bookmark_pages[i + 1][1] if i + 1 < len(bookmark_pages) else len(reader.pages)
    for page in reader.pages[start:end]:
        writer.add_page(page)
    safe_title = title.replace("/", "-").replace("\\", "-")
    writer.write(f"{safe_title}.pdf")

This iterates over top-level bookmarks and creates one file per section.

Python: split by file size

from pypdf import PdfReader, PdfWriter
import io

reader = PdfReader("large-report.pdf")
max_size = 20 * 1024 * 1024  # 20 MB
part = 1
writer = PdfWriter()

for page in reader.pages:
    writer.add_page(page)
    # Check current size by writing to memory
    buffer = io.BytesIO()
    writer.write(buffer)
    if buffer.tell() > max_size:
        # Remove last page and save
        writer.pages.pop()
        writer.write(f"part-{part}.pdf")
        part += 1
        writer = PdfWriter()
        writer.add_page(page)

# Save remaining pages
if len(writer.pages) > 0:
    writer.write(f"part-{part}.pdf")

qpdf: split by page range

qpdf input.pdf --pages . 1-5 -- output.pdf

qpdf is fast and handles edge cases well (encrypted PDFs, malformed files). It's a good alternative to Ghostscript.


Splitting by file size in detail

File-size splitting is harder than page-range splitting because page sizes vary. A page with a full-color photo might be 3 MB. A page of text might be 20 KB. You can't predict output size from page count alone.

The iterative approach (used in the Python example above) adds pages one at a time and checks the running file size. When the next page would push past the limit, it starts a new file.

Common email attachment limits:

  • Gmail: 25 MB (effective limit around 18 MB due to encoding overhead)
  • Outlook: 20 MB
  • Yahoo: 25 MB

If you're splitting to meet email limits, target a few megabytes below the stated cap to account for encoding.

An alternative approach: split into logical sections first, then compress any parts that still exceed the limit.


Splitting by bookmark in detail

PDF bookmarks are outline entries stored in the file's metadata. They point to specific pages and create a navigable table of contents in PDF readers. When you see a collapsible sidebar in your PDF viewer with chapter names, those are bookmarks.

Not all PDFs have bookmarks. Scanned documents almost never do. Documents exported from Word or LaTeX usually do. You can check by opening the PDF in any reader and looking for a bookmark or outline panel.

PDFsam Basic handles bookmark splitting well for non-developers. Select "Split by bookmarks," choose the bookmark depth (level 1 for chapters, level 2 for sub-sections), and run.

Bookmark splitting is useful for textbooks, technical manuals, legal filings with numbered sections, and annual reports with chapters.


Split vs delete pages: which do you need?

Splitting and deleting pages are different operations that sometimes get confused.

Splitting extracts pages into a new file (or multiple files). The original stays unchanged. Use this when you need a section as its own document, or when you need to break one PDF into several.

Deleting pages removes pages from the existing file. Use this when you need to drop a few pages and keep everything else as one document.

If someone asks you to "remove the cover page and send the rest," you want page deletion. If they ask for "just the appendix," you want splitting.


Tips for better splits

Check the page count before splitting. Off-by-one errors are common. Page 12 in the document might be page 14 in the PDF if the first two pages are unnumbered covers.

Use the thumbnail panel. Most PDF viewers show page thumbnails in a sidebar. Scroll through to visually confirm where sections start and end before entering page numbers.

Name output files descriptively. "pages5-10.pdf" is better than "split1.pdf," but "Q3-financial-summary.pdf" is better than both.

Verify output files after splitting. Open each one and confirm the right pages are included. A quick scroll takes less time than re-sending the wrong file.

Compress after splitting if output files are still too large for their intended use.

Merge splits back together if you make a mistake. Splitting is non-destructive when you keep the original.


Summary

Page-range splitting is the most common type and supported by every tool. If you know which pages you need, any method works.

File-size splitting is useful for email and upload limits but needs specific tools or scripts. PDFsam Basic handles it on desktop. Python with pypdf handles it programmatically.

Bookmark splitting works for structured documents but requires the PDF to actually contain bookmarks. PDFsam Basic and command-line tools handle this.

Online tools are quick for non-sensitive documents. Desktop software gives you the most split options. Browser-based local tools offer convenience with privacy. Command-line tools are best for automation and batch processing.