pdftoolskit.org
PDF (Portable Document Format) utilities, in the browser
Say hi →

Auto-Crop PDF Margins

content detected per page · common box option · lossless cropbox

Find the ink on each page and crop to it. Scans with broad white borders and slides exported with generous margins waste screen space on a tablet or an e-reader; this measures where the content actually is and sets the cropbox to match, without touching the page content.

Drop PDF files here or click to select

One or many · a cropped copy per file

    no files
    Ready.

    No PDF handy? Try sample-scanned.pdf — a scan with real margins. More free sample files.

    How the content box is found

    Each page is rendered at a low resolution onto a white canvas, then scanned for the outermost pixels that are darker than pure white by more than the tolerance. That rectangle is converted back into PDF points and set as the page's cropbox, with your padding added back on each side.

    Because it works on pixels rather than on the PDF's object structure, it handles anything that renders — scans, vector drawings, slides, photographs — and it does not care whether the content is text or graphics.

    Per page or one common box

    Per page crops each page as tightly as its own content allows, which gives the most screen space. The catch is that pages then have slightly different sizes, and a document read page by page can feel like it is breathing as the text block shifts.

    One common box takes the union of every page's content — the smallest rectangle that fits all of them — and applies it uniformly. Pages stay the same size and the text block stays put, at the cost of keeping some margin on the sparser pages. For anything you will actually read, this is usually the better choice.

    Tolerance and padding

    It is reversible

    Cropping sets the cropbox — the window a viewer displays — and never deletes content. Resetting the box in any PDF editor brings the full page back. If you want the margins genuinely gone (a smaller file, content actually removed), flatten the cropped file afterwards.

    FAQ

    Why did it barely crop my scan?

    The scan is not white enough. Grey platen cast, speckles, or a dark edge shadow all count as content at low tolerance. Raise the white tolerance to 20–35 and re-run.

    Why do the pages have different sizes now?

    Per-page cropping fits each page to its own content. Switch to one common box for uniform pages.

    Does it delete the margins from the file?

    No — it sets the cropbox, so the content is still there and the crop is reversible. Flatten the result if you need the margins really gone.

    What about a page number in the footer?

    It is content, so the crop includes it. Crop it away deliberately with Crop PDF if you do not want it.

    Is my file uploaded?

    No. Detection and cropping both happen in your browser.

    Related tools