Browser-based PDF tool · PDF → PDF without blank pages

Remove Blank Pages from PDF

Pages are drawn small and judged by how much ink they hold. Flagged pages are ticked for you to review, and the pages you keep are copied across, so text stays selectable. The PDF never leaves this browser tab.

Input and detection

One PDF up to 50 MB and 400 pages.

Drop a PDF here or click to choose

.pdf

Detection settings
0.15% ink

Share of the page area that may be dark and still count as blank. 0 flags only pages with no ink at all.

200 of 255

Lower ignores faint grey show-through; higher also catches pale marks.

3% per side

Hides scanner edge shadows, punch holes and border lines.

Detection looks at a small drawing of each page (longest side 560 px), so a very faint or tiny mark can fall under the threshold. Check the grid before saving; every page can be toggled by hand.

Pages

Thumbnails appear here after the PDF is read.

Add a PDF to see its pages and the ones that look blank.

Remove Blank Pages from PDF

Operator: Abdulla Al Fahad. How tools are built and checked

A document feeder that scans both sides of every sheet on a one-sided setting leaves a PDF where each odd page is a ghost: white paper with a little grey shadow along the edge and, if you are unlucky, a few specks of dust. Reports exported from a word processor have the same problem in a different shape, an empty last page because a table ended one line too low. Deleting those pages by hand means opening the file, counting thumbnails and typing a page list.

This tool does the counting. It draws every page small, measures how much of each page is dark, flags the pages that hold next to nothing, and shows them in a grid with a tick box under each one. You decide what goes, using the flagged set as a starting point, and the pages you keep are copied into a new PDF without being redrawn.

Key features

  • Per-page ink coverage, shown as a percentage under every thumbnail
  • Three sliders: blank threshold 0 to 5 percent, darkness cut 80 to 250, ignored border 0 to 10 percent per side
  • Single-pixel dust discounted with an eight-neighbour check, switchable off
  • Thumbnail grid with a keyboard-operable tick box on every page, and a Remove or Keep badge
  • Use detected pages, Select none and Invert buttons, with a live count of what will be removed
  • Kept pages copied rather than redrawn, so text stays text
  • Progress per page while scanning, and a Cancel button

How a page is judged blank, and what the saved file keeps

Detection is done on a drawing of each page whose longest side is 560 pixels (a page that is tiny on paper is enlarged up to twice its size), so an A4 page is about 396 by 560 pixels. The drawing includes form fields, stamps and annotations as a viewer would show them, drawn on white. A file can hold up to 400 pages and 50 MB, and one that only restricts printing or copying opens normally.

Each pixel is converted to a luminance from 0 (black) to 255 (white) using the weights 0.299, 0.587 and 0.114 for red, green and blue. A pixel counts as ink when its luminance is below the darkness cut, 200 by default. The outer border of the page, 3 percent of the width on the left and right and 3 percent of the height at the top and bottom by default, is not inspected at all. With the dust option on, which it is by default, a dark pixel is only counted when at least one of its eight neighbours inside the inspected area is also dark.

Coverage is the counted pixels divided by the pixels inside the border, shown under each thumbnail as a percentage. A page is flagged when its coverage is at or below the threshold, which defaults to 0.15 percent and can be set from 0 to 5 percent in steps of 0.05. Changing any slider re-judges every page straight away from the stored luminance, without drawing the PDF again. A page you tick or untick yourself keeps your choice when you move the sliders; the count line says how many pages you changed by hand.

The saved file is built by copying the pages you keep into a new document, so their text, fonts and vector drawings are unchanged and still selectable. Title, author, subject, keywords and creator are carried over. Bookmarks and the definition of fillable form fields are not, and the page tells you when your file had either. A file with owner-only restrictions loses them when re-saved, which is also stated. The output is named after the original with -no-blank-pages added.

How it works

pdf.js draws each page onto an off-screen canvas, the luminance of every pixel is stored in one byte, and a 160-pixel-wide thumbnail is made for the grid. The canvas is released straight away, so only the one-byte-per-pixel buffers stay in memory: about 220 KB for an A4 page, which is why the limit is 400 pages.

Judging a page is a single pass over its inspected rectangle. For every pixel below the darkness cut the code looks at up to eight neighbours inside the same rectangle and counts the pixel only if one of them is also below the cut. A speck one pixel wide has no dark neighbour and adds nothing; a thin line, a letter stroke or a stamp does.

Exporting asks pdf-lib to copy the chosen page objects from the source into a fresh document and saves it. Nothing is rasterised, which is why the output is usually a little smaller than the input and never blurrier.

Common use cases

  • Cleaning a duplex scan of a mortgage pack where the feeder was set to scan both sides of every sheet
  • Dropping the empty last page of a word-processor export before emailing it
  • Trimming a scanned lab notebook whose every other page is a blank verso
  • Removing the separator sheets a scanning bureau adds between documents, once they are ticked in the grid

How to use this tool

  1. Open the PDF and wait for the thumbnails; the status line counts pages as they are drawn.
  2. Look at the grid. Pages marked Remove in red are the ones at or below the threshold.
  3. If a page you want to keep is flagged, lower Blank at or below; if a dusty empty page is not flagged, raise it or tick the box by hand.
  4. If scanner shadows on the edges are being counted, widen the ignored border. If grey show-through from the other side is being counted, lower the darkness cut.
  5. Check the count in the Remove button, then press it. The cleaned PDF downloads and the panel lists the pages that were dropped.

Example

A 6-page duplex scan on A4 where pages 2, 4 and 6 are the empty backs

Drawing size       396 x 560 px   (221,760 pixels)
Ignored border     3% -> 12 px left and right, 17 px top and bottom
Inspected area     372 x 526 = 195,672 pixels
Threshold          0.15% -> up to 293 counted pixels still counts as blank
Page 4             edge shadow in the border, 40 isolated specks inside
Page 5             a signature block, about 3,000 dark pixels

What the tool shows

Page 4   0% ink      the shadow is inside the ignored border, the specks have no dark neighbours   -> Remove
Page 5   about 1.5%  3,000 / 195,672                                                               -> Keep
Result   pages 2, 4 and 6 removed, 3 pages remain; the other 3 are copied unchanged

Tips for best results

  • Move the threshold first, then the darkness cut. The threshold decides how much ink is tolerated; the cut decides what counts as ink at all.
  • Pale ruled or squared paper has faint lines that a cut of 200 may count. Lower the cut towards 150 if graph-paper backs keep getting kept.
  • A back side that carries a printed footer, a watermark or a bleed-through logo can sit under the default. Scan the coverage figures instead of trusting the red badges.
  • Untick a page rather than moving a slider when only one page disagrees with the rule; hand changes survive slider moves.
  • Run it on the original scan, not on a copy that has already been compressed hard, because JPEG blocks around ink raise the counts on pages that were clean.

Common pitfalls

Detection looks at a small drawing. A hairline mark or a very light pencil note can fall under the threshold and be flagged. The figure under each page is there so you can see how close a page is.

The border is ignored on purpose, so a page whose only content is a header or footer in that band, or a mark right at the edge, can be flagged. Set the border to 0 to inspect the whole page.

Bookmarks are not carried into the new file, and neither is the definition of fillable fields. Fields keep how they looked on the page but stop being fillable.

A page that failed to draw is left out of the grid and kept in the saved file, with a note saying which one it was, so it is never removed unseen.

Pages are removed, never reordered. Detection does not read text, so a page that only says it is intentionally left blank counts as having ink.

Common errors and how to fix them

"This PDF has 520 pages; this tool checks up to 400 at once."
Split the file in two first, run each part, and join the results afterwards. The limit exists because every page keeps a luminance buffer in memory.
"That would remove every page. Keep at least one."
Every tick box is on. Use Select none or Use detected pages, then tick only the pages that really are empty.
"This PDF is password-protected."
Remove the password first with an unlock tool, then come back; the file cannot be drawn without it.
A thin page, such as a page holding only a page number, is flagged as blank
A short number is only a hundred or so dark pixels at this size, which is under the default threshold. Set the threshold to 0 so only pages with no ink at all are flagged, or untick that page.

Best practices

  • Always look through the grid once before saving. The red badges are a proposal, not a decision.
  • Keep the original scan. The tool writes a new file and never changes the one you chose, but a deleted page cannot be recovered from the cleaned copy.
  • Prefer the lowest threshold that catches your blanks, so a sparse but real page, such as a signature page, stays in.

Why a threshold and not a yes or no

A scanned blank page is almost never pure white. The paper has a tint, the sensor adds grain, the edge casts a shadow, and a speck of toner or dust lands somewhere. A rule that asks whether any pixel is dark would flag nothing, and a rule that rounds everything light to white would also erase a pencilled initial. Measuring the share of dark pixels, after ignoring the border and discounting lone specks, gives a number that separates an empty sheet from a sparse one far more reliably than a single test.

That number depends on your scanner and paper, which is why it is a slider and why the figure is printed under every thumbnail. For a clean office scan the blanks sit at zero and the real pages start above one percent, and anywhere in between works. For a grainy scan of old paper the gap is narrower and the darkness cut matters more.

What is kept and what is not

Because pages are copied, anything drawn on a kept page is preserved: embedded fonts, vector graphics, images and link annotations on the page. The document-level extras are the exception. The bookmark tree describes the old page order and is dropped, and an interactive form's field definitions live outside the pages, so they stay behind with the original.

If the PDF was digitally signed, the signature is not carried into the new file, because it covers the exact bytes of the original. Keep the signed original for any purpose that needs the signature.

Frequently asked questions

Is my PDF uploaded?

No. The pages are drawn and measured in this browser tab and the new file is built there too. Nothing is sent to a server.

Will the text still be searchable after I remove pages?

Yes for the pages you keep. They are copied across as they are, not turned into pictures, so a scanned PDF that has a text layer from OCR keeps it.

Does it change the order of the pages or recompress the images?

Neither. The kept pages stay in their original order and are copied with their images exactly as stored, so nothing is recompressed.

Can I remove a blank page that is not detected?

Yes. Tick any thumbnail by hand and it is added to the removal list, whatever its ink figure says.