Skip to content
DevToolKit

Remove Blank Pages from PDF

Detect and remove blank or near-blank pages from any PDF using two-tier analysis: text content check and pixel luminance scan with adjustable sensitivity. Runs in your browser.

pdf

Drop your PDF here, or click to browse

Files are processed entirely in your browser — never uploaded

Lenient (90%)Strict (100%)
Processed locally
Was this tool helpful?

How to Use

Detect and remove blank pages from your PDF in four steps:

  1. Upload your PDF — Drag and drop the file or click the dropzone to browse. The tool reads the file locally and begins analyzing every page for blankness using a two-tier detection algorithm.
  2. Adjust sensitivity — Use the slider to control how strictly blankness is defined. The default threshold (99.5%) catches most blank pages while ignoring pages with faint watermarks or headers. Lower values flag pages that are mostly white but contain minor marks.
  3. Review detected pages — A thumbnail grid displays every page in your PDF. Pages detected as blank are highlighted and pre-selected for removal. Click any page to toggle its selection — you have full control over which pages are removed.
  4. Remove and download — Click "Remove Blank Pages" to build a new PDF without the selected pages. Download the cleaned file — your original PDF is never modified.

The two-tier detection algorithm works in sequence for each page. First, it extracts text content using the PDF's text layer. If any characters are found, the page is immediately classified as non-blank — no further analysis is needed. If no text is present, the tool renders the page to a small 100x100 canvas and computes the ITU-R BT.601 luminance (Y = 0.299R + 0.587G + 0.114B) for every pixel. Pages where the percentage of near-white pixels (luminance above 250 on a 0-255 scale) exceeds your sensitivity threshold are marked as blank. This dual approach catches both digitally-created blank pages (which have empty text layers) and scanned blank pages (which contain only white pixel data).

About This Tool

Blank pages in PDF documents are surprisingly common and originate from multiple sources. Duplex scanners insert blank pages between single-sided originals. Word processors add section breaks that produce empty trailing pages. Mail-merge systems generate inter-document spacers. Legal filing workflows pad page counts to even numbers. Regardless of origin, these blank pages inflate file sizes, waste paper when printed, and create navigation friction when reading on screen.

Detecting whether a PDF page is truly blank requires more than checking if its content stream is empty. A page with an empty content stream might still display inherited content from a parent page node, background colors from the page's MediaBox, or form field appearances. Conversely, a page with a non-empty content stream might be visually blank if it contains only whitespace characters, invisible text (white text on white background), or drawing operations that produce no visible output. Reliable blank detection demands examining what the page actually renders, not just what its content stream declares.

This tool's two-tier approach addresses these edge cases systematically. The text extraction tier uses PDF.js (Mozilla's JavaScript PDF renderer) to parse each page's text content objects. PDF text content items include the raw string, font information, and positioning coordinates. The tool strips whitespace and counts remaining characters. Any page with at least one non-whitespace character is classified as non-blank — this handles digital PDFs where text is directly encoded in the content stream.

The pixel analysis tier handles scanned documents, image-only PDFs, and pages where content is embedded as graphics rather than text objects. It renders each page to a 100x100 pixel canvas — small enough for fast processing but sufficient to detect content. For each pixel, the tool computes luminance using the ITU-R BT.601 formula: Y = 0.299R + 0.587G + 0.114B. This weighted sum accounts for human perception of brightness — green contributes most because our eyes are most sensitive to it. Pixels with luminance above 250 (on a 0-255 scale) are classified as near-white. If the proportion of near-white pixels exceeds the sensitivity threshold, the page is blank.

The sensitivity parameter controls the trade-off between false positives and false negatives. At 99.5% (the default), a page must be almost entirely white to be flagged as blank — only 0.5% of pixels can be non-white. This setting reliably catches completely blank pages while ignoring pages with headers, footers, page numbers, or faint watermarks. Lowering the threshold to 95% catches pages with scanner noise, dust specks, or very faint pencil marks. At 90%, even pages with significant edge shadows from flatbed scanning are flagged. The slider provides continuous control so you can tune detection to match your specific document's characteristics.

Once blank pages are identified and confirmed, the removal process uses pdf-lib to construct a new PDF containing only the retained pages. Rather than deleting pages in place (which can leave orphaned objects in the file structure), the tool copies each non-blank page's complete page dictionary — content streams, resource dictionaries, annotations, and embedded fonts — to a fresh document. This copy-based approach produces a clean output file with no residual data from removed pages, which is important both for file size and for security when blank pages might have contained invisible content.

The canvas-based rendering uses the willReadFrequently: true context option, which instructs browsers to keep pixel data in CPU-accessible memory rather than GPU textures. Without this flag, Chrome disables GPU acceleration after the second getImageData() call, causing subsequent pixel reads to become approximately 470 times slower. Since this tool reads pixel data for every page in the document, the optimization is critical for acceptable performance on large PDFs.

Why Use This Tool

Removing blank pages from PDFs addresses real problems in scanning, document assembly, and distribution workflows:

  • Duplex scanning cleanup — Scanning single-sided documents on a duplex scanner produces a blank page for every original page. A 20-page report becomes 40 pages, with half being empty. Removing blanks cuts the file to its true size and eliminates confusing blank screens when reading on a tablet or phone.
  • Merged document cleanup — Combining multiple PDFs often introduces trailing blank pages from individual documents. A set of 10 reports, each padded to an even page count, can accumulate 5-10 unnecessary blank pages after merging.
  • Print cost reduction — Every blank page costs paper and ink (even blank pages may trigger printer activity). Removing blanks before printing a 200-page document can save 10-30 sheets depending on the source, which adds up across large print runs.
  • Email and upload compliance — Many submission systems impose file size limits. Blank pages add 5-15 KB each due to page tree overhead, metadata, and content stream headers. In a 500-page scanned document with 250 blank pages, removal can reduce the file by 2-4 MB.
  • Accessibility improvement — Screen readers announce blank pages as separate page elements, forcing users to navigate past them manually. Removing blank pages creates a smoother reading experience for assistive technology users.
  • Archival efficiency — Document management systems that store and index PDFs benefit from clean files without blank page noise. Search indexing, thumbnail generation, and page count metadata all become more accurate when blanks are removed.

Processing your PDF locally in the browser is essential for documents that may contain sensitive information. Scanned contracts, medical records, financial statements, and legal filings frequently contain blank pages from duplex scanning — but uploading these files to a cloud-based tool exposes all content pages to third-party servers. This tool guarantees that your entire document stays on your device throughout detection, review, and removal. No network requests, no server-side processing, no data retention risks.

FAQ

How are blank pages detected?
A two-tier algorithm first checks for text content. If no text is found, it renders the page to a small canvas and analyzes pixel luminance. Pages where over 99% of pixels are near-white are marked as blank.
Can I adjust the sensitivity?
Yes. A threshold slider lets you control how strictly blankness is defined. Higher sensitivity catches pages with faint marks or scanner noise.
Can I review pages before removal?
Yes. The tool shows a thumbnail grid with all detected blank pages pre-selected. You can toggle any page before confirming the removal.
Does this handle scanned PDFs?
Yes. The pixel-level analysis detects visually blank scanned pages that would pass a text-only check.
Is my PDF uploaded to a server?
No. All processing runs locally in your browser. Your file never leaves your device.