Crop the margins of a PDF

Trim the white margins from every page automatically, or set your own in millimetres. Runs on your device, so the document is never uploaded.

🔒 Runs in your browser

Why "trim the white margins" is harder than it looks

Every free PDF cropper gives you four boxes to type numbers into, and then you guess, download, look, and guess again.

What people actually want is a button that says "get rid of the white edges". That requires knowing where the ink is on each page, and that is the part most tools skip.

This one measures it. Before cropping, every page is passed through the same rendering engine that powers the compressor here, running in a mode that draws nothing and simply reports the bounding box of the marks on the page. Ghostscript has to work that out anyway in order to render anything, so asking it is exact and costs almost nothing. On a test page with content drawn at a known position, the measurement came back accurate to within 0.02 of a point — about a hundredth of a millimetre.

The two modes, and which one you want

Keep every page the same size is the default, and it is what you want for anything you will print or scroll through.

It takes the smallest margin found on each side across the whole document. If page 4 has a wide table that reaches further left than anything else, page 4 sets the left edge for every page. Nothing gets cut anywhere, and the document still behaves like one document.

Crop each page tightest cuts every page down to its own content. Pages come out different sizes. It is genuinely useful when you are pulling figures or diagrams out of a paper, and genuinely annoying when you print the result — a page holding one short paragraph gets cropped to a strip.

The thing you should know before you use this on anything sensitive

Cropping hides content. It does not delete it.

A PDF page carries two boxes: the MediaBox, which is the real sheet, and the CropBox, which is the part a viewer shows you. Cropping sets the CropBox. Everything outside it is still sitting in the file, and anyone can widen the box in thirty seconds and see it again.

This matters because "crop out the sensitive bit" is a completely reasonable-sounding idea that does not work. If you need something gone, you need redaction, and redaction means removing the content itself.

We verified this behaviour rather than assuming it: after cropping, the MediaBox of the output is still the full original page.

A margin of 2 mm is left on purpose

Automatic mode leaves about 6 points — roughly 2 mm — around the detected content, rather than cutting exactly at the edge of the ink.

Cropping flush to the measured bounds looks wrong. Descenders on letters like g and y, the antialiased edge of a scanned character, and the outer stroke of a table border all sit within a point or two of the boundary, and shaving them makes a page feel cramped in a way that is hard to name but easy to see.

When manual mode is the better tool

Automatic mode is the right answer when the margins are white. It is the wrong answer when they are not — a page with a header rule, a footer with a page number, or a printed border will have "ink" out at the edges, so there is nothing for it to trim.

In that case, set the numbers yourself. Millimetres, one per edge, applied to every page.

This tool runs entirely inside your browser. Your file is never uploaded — it never leaves your device, so there is nothing for us or anyone else to read, store or leak.

Common questions

How does the automatic mode know where the margins are?

It measures the real bounding box of the printed marks on every page. This is not a guess or a pixel-scan — it asks the rendering engine, which has to work out exactly where the ink is in order to draw the page at all. On a test page the measurement was accurate to within a fiftieth of a point.

Will cropping cut off content on a page I have not checked?

Not in the default mode. "Keep every page the same size" uses the smallest margin found anywhere in the document, so the page with the widest content sets the limit for all of them. That deliberately crops less than the tightest possible, in exchange for never losing anything.

Does cropping actually delete the trimmed area?

No, and anyone who tells you otherwise is wrong. Cropping sets the page’s CropBox, which tells a viewer what part of the page to display. The content outside it is still in the file and can be brought back by widening the box. If you are trying to remove something sensitive, cropping is not the tool — redaction is.

Why did my file not get smaller?

Because nothing was removed. Cropping changes what is displayed, not what is stored, so the file size stays roughly the same. If you want a smaller file, compress it instead.

Can I crop a scanned document?

Yes, and it is one of the better uses for this. A scan usually carries a grey border where the lid did not close flat, plus a dark edge from the platen. Automatic mode finds the real content and trims the lot.

Last reviewed