English

Crop PDF — Trim Margins, Remove White Space

Crop PDF page margins manually or by detecting white space, applied as a CropBox in the browser

Runs in your browser · nothing is uploaded

Drop the PDF to crop here

Add one PDF (up to 100 MB). Adding another file replaces the current one. Files never leave your browser.

What it does

This tool trims the margins of PDF pages: black borders on scans, wide white margins in e-book PDFs, or empty space around exported slides. Smaller margins make text much larger on a tablet or phone. Set the top, right, bottom and left margins in millimetres, or let the tool analyse each page and find the white margins itself. The preview outlines the area that stays with a dashed box, and you can drag on it with a mouse or finger to draw that area directly.

How to use

  1. Drop one PDF on the box or press Choose PDF.
  2. Pick a method.
    • Set margins: type the margins to cut off in millimetres. Dragging on the preview fills in the numbers for the area you draw.
    • Detect white margins: set the space to keep around the content and press Find white margins. Progress is shown for long documents.
  3. To crop only some pages, choose Choose pages and type ranges such as 1-3, 5.
  4. Check the dashed box in the preview and press Crop PDF, then download the result.

How it works

  • Method: each page’s CropBox is set to the new area (the page boundary defined in ISO 32000). The MediaBox and the content are untouched.
  • Measured from what you see: margins are taken inward from the current visible area, so cropping an already cropped PDF cuts further.
  • Safety: pages that would keep less than 14 pt (about 5 mm) in width or height are left as they are, and their numbers are listed in the result.
  • Detection: a pixel counts as content when any of its red, green or blue values is below 240 (of 255); rows and columns with fewer than two such pixels are ignored. The analysis render is about 900 px on the long side, so expect roughly 1 mm of tolerance on A4.
  • Libraries: pdf-lib (MIT) writes the CropBox; PDF.js (Apache-2.0) renders pages for preview and detection.

Examples

Goal Settings
Trim 5 mm scanner borders Set margins, 5 on all sides
Read an e-book PDF on a phone Detect white margins, keep 3 mm
Equal page sizes for printing Detect white margins, same size on every page
Remove a header band on page 1 Set margins, top 25 and others 0, pages 1

To fit the cropped pages onto a fixed paper size such as A4, continue with Resize PDF Pages.

FAQ

Is the cropped-off content deleted?

No. The tool shrinks the visible area of each page (its CropBox). Viewers and printers no longer show the cut-off parts, but the content is still in the file and a PDF editor can bring it back. Do not use cropping to remove personal information.

How does white-margin detection work?

Each selected page is rendered at about 900 pixels on its long side, and the outermost rows and columns that contain non-white pixels are found. Single specks are ignored, and the space you choose (3 mm by default) is kept around the content. Blank pages stay as they are.

Can every page end up the same size?

Yes. Turn on “Crop every page to the same size” in detection mode. The smallest margin found on each side is used for every page, so even the widest content stays whole and all pages match.

Which side is the top on a rotated page?

The side that is on top as the page is shown. A 10 mm top margin always cuts 10 mm from the visible top edge.

Does cropping make a scanned PDF smaller?

Hardly. Only the visible area changes; the images stay the same. Use a PDF compressor if you need a smaller file.

Missing a tool?