Command Palette

Search for a command to run...

How to Delete Blank Pages from a PDF, and Why Some Are Hard to Detect

How to Delete Blank Pages from a PDF, and Why Some Are Hard to Detect

T
Toolz Team
|Sep 19, 2026|16 min read
Prefer Toolz.dev on Google

Part of the PDF Tools collection

Remove Blank Pages

Find and delete blank pages from a PDF by analysing what each page draws, then download the cleaned file.

Use the Remove Blank Pages

A PDF with blank pages in it is a small annoyance until it is printed, emailed to a client or submitted to a portal that counts pages. A duplex scanner saves the empty back of every single-sided sheet. A Word export adds a final page because of a stray paragraph mark. A merge leaves separator sheets behind. The pages carry nothing, but they cost paper, lengthen the scroll and make a document look unfinished.

Deleting them sounds trivial, and for a page you can see and name it is. The hard part is finding them in a long file, and deciding which pages are truly blank. This guide explains how blank pages get into a PDF, how software can tell a blank page from a page with content, where that detection runs out, and how to use the Remove Blank Pages tool to clean a file without deleting something you needed.

TL;DR: A blank PDF page is a page that draws nothing: it has no content stream, a content stream with no drawing operators, or text operators that only show spaces. The Remove Blank Pages tool reads each page's content stream, pre-selects the pages that are certainly blank, and leaves pages that draw only an image (which is what a scanned blank sheet looks like) for you to pick by hand. You confirm the selection, at least one page must remain, and the cleaned file downloads as name_cleaned_N_removed.pdf. It is client-side, free, no signup, and nothing is uploaded.

Where do blank pages in a PDF come from?

Blank pages are almost always a side effect of how the file was made, not a choice anyone made on purpose. The common sources fall into a handful of patterns, and knowing which one produced your blank pages tells you how they will be detected.

Duplex scanning is the biggest source. A scanner set to capture both sides of every sheet saves the back of a single-sided page as its own image. A 20-sheet letter scanned this way becomes a 40-page PDF with 20 near-white images in it.

Word processor exports are the second. A document whose last line is followed by an empty paragraph, a page break or a section break can export with a trailing page. That page usually holds a text operator showing a single space, because the exporter wrote out the empty paragraph as it found it.

Merges and templates are the third. Combining several PDFs can carry over cover separators or divider sheets, and report generators often pad a document to an even page count so double-sided printing lines up.

Page-level edits are the last. A page added as a placeholder and never filled is common in files built up over time.

These patterns matter because they produce different kinds of "blank" inside the file. Some pages contain nothing at all. Some contain instructions that draw nothing. Some contain a full-page picture of white paper. Software can recognize the first two with certainty and cannot recognize the third without measuring pixels.

How can software tell that a PDF page is blank?

Software tells a blank page from a page with content by reading the page's content stream and checking whether any instruction in it puts marks on the page. It does not look at the rendered picture.

Every PDF page describes its appearance as a content stream: a sequence of operators with operands, defined in the PDF specification, ISO 32000-2. Most operators only set up state. Tf picks a font and size, Td moves the text position, rg sets a fill color, cm changes the coordinate system. None of them draws anything on its own. Only a small group of operators marks the page:

  • text-showing operators: Tj, TJ, ' and "
  • path-painting operators: S, s, f, F, f*, B, B*, b and b*
  • Do, which paints an external object such as an image or a form
  • sh, which paints a shading
  • BI, which begins an inline image

A page whose content stream contains none of those operators draws nothing, however long the stream is. That is a definite answer, not an estimate, and it is the basis of the blank page remover on Toolz.

The check has to be careful about what counts as an operator. The letter f is a fill operator, but it also appears inside a font name like /F1. A string literal such as (BT Do ET) is text to be shown, not three operators. So the tool strips string literals, hex strings and comments before it scans, and it only matches operators on token boundaries. Without that step, every font reference would look like ink and almost no page would ever be reported blank.

What does a "blank" content stream look like?

Seeing a content stream makes the idea concrete. Here are three decoded streams, the kind you would find behind three pages of an exported document.

A page that draws text:

BT
/F1 12 Tf
72 720 Td
(Hello) Tj
ET

A page whose only text is a single space, the classic trailing page from a Word export:

BT
/F1 12 Tf
72 720 Td
( ) Tj
ET

A page that sets up state but never draws:

q
0 0 0 rg
1 0 0 1 72 720 cm
Q

The first stream shows the string Hello, so the page has content. The third has no marking operator at all, so it is blank. The second is the interesting one. It contains Tj, so a simple operator count would call it content. But the only string it shows is a space, which puts nothing visible on the paper.

The tool handles that case explicitly. When every marking operator on a page is a text operator, it looks at the strings being shown. If every literal string is whitespace, and every hex string decodes to spaces, tabs or line breaks, the page is reported as "Only whitespace is drawn" and treated as blank. That one rule catches a large share of the blank pages people are trying to remove from exported documents.

Which pages are detected, and which are left for you?

The tool gives each page one of three verdicts, and only one of them is pre-selected for deletion. This table summarizes how each kind of page is drawn and what happens to it.

Page type What its content stream holds Verdict Pre-selected for removal
Page added and never drawn on No content stream Blank ("No content stream.") Yes
Page that sets fonts, colors or coordinates only Operators, but none that mark the page Blank ("Content stream draws nothing.") Yes
Trailing page from a Word export Text operators showing only spaces or line breaks Blank ("Only whitespace is drawn.") Yes
Scanned blank sheet A single Do painting a white image Image-only No
Scanned page with real content A single Do painting an image Image-only No
Page with a footer number, border line or white rectangle Text or path-painting operators Content No
Page whose stream cannot be decoded Unknown Content, kept to be safe No
Normal text or graphics page Marking operators Content No

Two rows deserve a closer look.

The image-only rows are the same row twice, from the tool's point of view. A scanned blank sheet and a scanned signed contract are both one image drawn with Do. Telling them apart requires rendering the page and measuring how white the pixels are, which needs a rendering engine the tool does not carry. Rather than guess, it leaves image-only pages unselected and unmarked, so they look like any other page in the grid. Deleting a page cannot be undone, and a tool that guesses wrong on a contract does more harm than one that asks.

The undecodable row is a safety rule. If a content stream is compressed with a filter that cannot be read, the page cannot be judged, so it is treated as content. Deleting a page because of a parse failure is the one outcome with no recovery.

How do you remove blank pages from a PDF step by step?

The workflow has four steps, and nothing is deleted until the last one.

  1. Open the file. Drag a PDF onto the remove blank pages tool or click to choose one. The page shows the file name, size and page count.
  2. Read the analysis. Every page is checked. The summary line reads, for example, "2 blank pages detected", and the blank pages appear in red in the page grid, already selected.
  3. Adjust the selection. Click any page number to add it or remove it. "Select Blank" restores the detected set, and "Deselect All" clears everything. A detected blank page that you deselect keeps a small yellow dot, so you can still see what the analysis found. For scanned files, compare against the original and click the image-only pages that are truly empty.
  4. Download. The button reads "Download (2 pages removed)" or whatever your count is. The remaining pages are copied into a new document named after the original, such as report_cleaned_2_removed.pdf.

The output summary under the grid shows original pages, pages to remove and resulting pages, so you can check the arithmetic before you click. The download button is disabled when nothing is selected and when every page is selected, because at least one page must remain in the output.

A worked example: before and after

Take a five-page file called report.pdf, assembled from several sources:

Page What it contains Verdict
1 Title and introduction text Content
2 Placeholder page, never drawn on Blank
3 A single space left by a Word export Blank
4 A scanned image of a signed form Image-only
5 Closing text Content

When the file loads, the summary reads "2 blank pages detected", and pages 2 and 3 are pre-selected in red. Page 4 stays unselected with no marker. The button reads "Download (2 pages removed)".

Before: 1 2 3 4 5

After: 1 4 5, renumbered in the new file as 1 2 3

The saved file is report_cleaned_2_removed.pdf, with three pages. The original page 4 is now page 2 and the original page 5 is now page 3.

Now change one detail. Suppose page 4 were a scan of the empty back of a sheet rather than a signed form. The analysis would reach exactly the same verdict, image-only, and the file would load exactly the same way. The difference is that you would click page 4 before downloading, the button would read "Download (3 pages removed)", and the output would be report_cleaned_3_removed.pdf with pages 1 5, renumbered 1 2.

Why was a page that looks blank not detected?

A page that looks blank but is not pre-selected almost always draws something small or invisible. The analysis is about operators, and several common marks are easy to miss by eye.

A running header or footer with a page number is a text operator showing real characters, so the page has content. A thin border line, a crop mark or a hairline rule is a path-painting operator. A white filled rectangle is a fill operator, even though white on white shows nothing. And a scanned page with an OCR layer carries invisible text on top of the image, drawn with text operators, so it reads as content.

In all of these cases the fix is the same: click the page number to select it by hand. The tool never stops you from removing a page it did not detect, it only refuses to decide for you.

If the file does not open at all and the page shows "Error loading PDF. Please try another file.", the most likely cause is password protection. Encrypted PDFs are refused when they are parsed. Remove the password in a PDF viewer you trust, save a copy, and load that copy instead.

What changes in the cleaned file, and what does not?

The pages you keep are copied as they are, and the document-level extras are not. Understanding the split helps you decide whether to keep the original.

The kept pages are copied with pdf-lib's page copy, not rendered and re-encoded. Text stays selectable, fonts stay embedded, images keep their resolution, and each page keeps its size and rotation. The content of a kept page is byte-for-byte the same drawing instructions it had before.

What is not carried over is the structure that belongs to the document rather than to pages. The new file has no document title and no bookmarks, because the outline tree lives at the document level. Keep the original if those matter to you, which is easy because the tool never modifies it: the cleaned PDF is a new download.

File size usually drops, but by less than people expect. A page that draws nothing holds almost no data, so removing it saves little. The real savings come from scanned files, where every blank page is a full-size image. If the goal is a smaller attachment rather than fewer pages, run the result through Compress PDF as well; the guide to compressing a PDF explains what compression can and cannot shrink.

Remove Blank Pages vs Delete PDF Pages vs Organize PDF

These three tools overlap, and choosing the right one comes down to whether you already know which pages should go.

Situation Best tool Why
You do not know where the blank pages are Remove Blank Pages Finds pages that draw nothing and pre-selects them
You know the page numbers or a range to cut Delete PDF Pages Removes the pages you name, blank or not
You need to remove some pages and reorder the rest Organize PDF Move and delete pages in one pass
You want the blank-separated sections as separate files Split PDF Cut the document into several PDFs by range

A useful pattern for scanned documents is to combine them. Use the blank page detector first to catch the pages that are certainly blank and to see the page grid, then click the scanned empty backs by hand. If the page order is also wrong after scanning, the guide to organizing PDF pages covers reordering, and the same client-side processing applies. The full set of page tools is on the PDF tools hub.

Is it safe to remove blank pages from sensitive documents online?

With a client-side tool, the document never leaves your device. The file is read, analyzed and rewritten in JavaScript inside the browser tab. It is not uploaded, logged or stored on a server, and once the page has loaded it keeps working without a network connection.

That matters for the documents that tend to collect blank pages: scanned contracts, medical and insurance paperwork, bank statements and HR files. Those are exactly the files that should not be sent to an unknown server to delete a few empty sheets. The tool is free, no signup, and adds no watermark.

Alternatives to an online blank page remover

A browser tool is one of several routes, and each has a place.

Desktop PDF editors such as Adobe Acrobat can delete pages from a thumbnail panel, and some paid editions include a blank page detection option in their scan or optimize features. That route suits people who already have the software licensed.

Scanner software is often the best place to fix the problem at the source. Many scanner drivers include a "skip blank pages" or "remove blank pages" option that measures the image as it is captured, before the PDF is written. Because the driver sees the pixels, it can catch blank backs that an operator-level check cannot. Turning it on prevents the problem for future scans.

Command-line tools suit batch work. qpdf can write a new file from selected pages, for example qpdf in.pdf --pages . 1,4,5 -- out.pdf, once you know which pages to keep. Detecting blank scanned pages in a script usually means rendering each page with a tool like Ghostscript or Poppler and measuring how much of the image is non-white.

The advantage of the client-side tool is that it needs no installation, runs the same on any operating system, never uploads the file, and shows you every decision before anything is deleted.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!