Crop PDF

Published Updated

Trim 5 mm, 10 mm or your own margin from each side of every PDF page, or only the pages you list. The trimmed strip is hidden, not deleted.

Margins in millimetres, measured from the paper edge

Crop PDF takes a fixed strip off each side: 5 mm with Standard, 10 mm with Wide, or any non-negative number per side with Custom, decimals included. Margins are measured from each page's full paper edges, so a file mixing A4 and Letter pages is trimmed evenly on both.

Nothing is redrawn. The tool writes a crop box into each page with pdf-lib, and the PDF standard, ISO 32000-1, Table 30, defines the crop box as the visible region of the page: contents are clipped to it when the page is displayed or printed. Selectable text stays selectable, and images are not recompressed.

What the presets leave on common paper sizes

Sizes in millimetres, from the tool's own formula; the A4 and Letter rows were also checked on test pages:

PaperFull pageStandard (5 mm)Wide (10 mm)
A4210 x 297200 x 287190 x 277
A5148 x 210138 x 200128 x 190
US Letter215.9 x 279.4205.9 x 269.4195.9 x 259.4
US Legal215.9 x 355.6205.9 x 345.6195.9 x 335.6

Cropping a PDF

  1. Step 1

    Add the PDF

    The page count and the size of page 1 in millimetres appear once the file is read.

  2. Step 2

    Pick the margins

    Standard takes 5 mm off every side, Wide takes 10 mm, and Custom lets you set top, bottom, left and right separately.

  3. Step 3

    Crop and download

    Choose all pages or a list such as 2-5, 8, then save the copy ending in -cropped.pdf. The new size of the first cropped page is shown.

Hidden is not the same as removed

Because the crop box only frames the page, anything in the trimmed strip is still stored in the file. Handy for undoing a crop, risky if the margin holds a name or an account number. For content that must not be recoverable, use Redact PDF, or cut the page down to an image region with PDF to JPG and Crop Image.

Pages that behave differently

  • Rotated pages. The Rotate entry turns a page clockwise only when it is displayed, so on a page stored at 90 or 270 degrees the Top and Bottom fields trim the sides you see. With 40 mm of top margin, a rotated A4 test page came out 257 x 210 mm on screen.
  • Re-cropping. Each run starts again from the full page, so a 5 mm crop applied twice is still 5 mm.
  • Unusual page boxes. A few PDFs put the page corner somewhere other than 0,0, or list the corners in reverse order. The margins are counted from that corner, so these pages are trimmed like any other.
  • Protected files. Encrypted PDFs are refused; Unlock PDF removes a password you know.

What we read back from cropped files

We ran the tool's own steps in Node 22.23.1 (the margin formula from lib/pdfCropBox.ts, then pdf-lib 1.17.1 setCropBox and save) on generated A4 test pages and read the results with pdf-lib and pdf.js 5.4.624.

TestWhat we read back
One A4 page, Standard (5 mm)Visible area 200 x 287 mm (view box 14.17, 14.17 to 581.11, 827.72 points). File size 998 to 1,039 bytes, 41 bytes more.
Same page, Wide (10 mm) and 40 mm190 x 277 mm and 130 x 217 mm; file sizes 1,038 and 1,038 bytes.
500 pages, 5 mmSource 167,407 bytes, cropped 167,936 bytes (529 more), 69 ms in Node. For 50 pages 17,301 to 17,398 bytes (97 more), 11 ms.
One page with a 1,000 x 1,000 pixel picture (3,001,884 bytes), 100 mm off every side3,001,922 bytes, 38 more. The picture is not removed or recompressed.
A second run on the outputStill 200 x 287 mm, the same as after the first run.
Pages 2 and 4 of 5Those two read 200 x 287 mm; pages 1, 3 and 5 stayed 210 x 297 mm.
A page whose page corner is at 100, 100 instead of 0, 0Crop box 114.17, 114.17 and 566.93 x 813.54 points, 200 x 287 mm visible: the margins are counted from that corner.

Cropping therefore changes the page boxes and almost nothing else (file sizes can vary by a byte or two between runs): the file does not get smaller, so to reduce the size of a file use Compress PDF.

A cropped strip is hidden, not gone: a test

On a test page with the words TOPLEFT and BOTTOMRIGHT 8 points from the corners and a line in the middle, a 10 mm crop left only the middle line in pdf.js's text content. The same file, with the crop box set back to the full page using pdf-lib, gave all three lines again, so the words were still stored in the cropped file. With the 5 mm margin, pdf.js returned the cut word as OPLEFT: text that is only partly inside the visible area comes back partly.

Two things follow. A tool that reads text through pdf.js, such as a text extractor, may leave out what was cropped, which is not evidence that the content is gone. And a person with a PDF editor can bring the strip back. If a margin holds something private, remove it with Redact PDF, which renders each page as an image (see that page).

Pages that were cropped before, and margins that are too big

The margins are measured from the full page, and the result is then kept inside the page's existing crop box, so a file that was cropped before does not get a bigger visible area. A test page with a crop box of 100 x 141.1 mm kept the same crop box after a Standard crop, because the 5 mm margins lie outside it. The same held when the crop box was set on the page tree rather than on the page itself.

Margins that are too large are held at the 10-point minimum: 200 mm off every side of an A4 page left 3.5 x 3.5 mm, and 150 mm off the top and bottom left a strip of 210 x 3.5 mm. On a page stored with a 90-degree rotation, a Top margin of 40 mm gave 257 x 210 mm and a Left margin of 40 mm gave 297 x 170 mm, so Top and Bottom act on the sides you see and Left and Right on the top and bottom.

What happens to an earlier crop, case by case

We ran the tool's own steps in Node 22.23.1 (lib/pdfCropBox.ts, then pdf-lib 1.17.1 setCropBox and save) on generated A4 pages that already carried a crop box, and read the results back with pdf.js 5.4.624. Sizes are the visible area pdf.js reports. One run each.

Page beforeMarginsVisible area after
Crop box 100 x 141.1 mm inside the pageStandard (5 mm)100 x 141.1 mm, unchanged; a second run left it unchanged again
Cropped 3 mm on every side (204 x 291 mm)Standard (5 mm)200 x 287 mm, the same as on an uncropped A4 page
Same pageWide (10 mm)190 x 277 mm
Same page40 mm off the top only204 x 254 mm: the top moved, the other sides kept the earlier crop
Crop box on the left half of the page (105 x 297 mm)Standard (5 mm)100 x 287 mm: 5 mm off the left, top and bottom, right edge where the earlier crop put it
Crop box larger than the page (it reached 50 points past every edge)Standard (5 mm)200 x 287 mm: the part outside the page does not count
Crop box 100 x 141.1 mm200 mm off every side3.5 x 3.5 mm, inside the earlier crop box
A 20 mm strip along the left edge30 mm off the left only (the margin misses the strip)A 3.5 mm strip at the strip's right edge, the side nearest the margin

For a page with no crop box of its own, the result is the same box as the margin formula alone: in 56 combinations of page boxes and margins the two agreed to within a floating-point rounding difference, far below a millionth of a point. The tables above for plain A4 pages therefore still apply.

The page also shows the earlier crop before you start: when the first page's visible area is smaller than its paper size, the line under the file details gives that smaller size.

Crop PDF questions

Does cropping delete what is outside the box?

No. The tool sets each page's crop box, which the PDF standard defines as the region shown when the page is displayed or printed. The trimmed strip stays in the file, and a PDF editor can bring it back by resetting the crop box. To remove content for good, use Redact PDF.

Can I crop only some pages?

Yes. Choose the page-range option and type numbers and ranges such as 2-5, 8, 10-12. Pages you leave out keep their full size.

Why did a second crop not trim any further?

Margins are always measured from the full page, not from an earlier crop. Running Standard twice on an A4 page gives the same 200 x 287 mm result as running it once. To take off more, enter the total margin you want, such as 15 mm.

Why were the sides trimmed when I set the top margin?

That page is stored sideways with a rotation setting that viewers apply when they show it. The margins follow the page as stored, so on a page turned by 90 or 270 degrees, Top and Bottom trim the edges you see on the left and right. Swap the values to compensate.

Can I crop a page to an exact size such as A5?

Yes, by working out the margins. From an A4 page, 31 mm off the left and right and 43.5 mm off the top and bottom leaves 148 x 210 mm, the A5 size. The content is not scaled, only framed; to shrink a whole page onto smaller paper, use Resize PDF.

How small can the visible area get?

The tool keeps it at least 10 points, about 3.5 mm, wide and high, unless an earlier crop had already made it smaller. Margins that add up to more than the page stop at that minimum instead of causing an error.

Does cropping make the PDF smaller?

No. In our test the cropped files were 38 to 529 bytes larger than the originals, including a file with a 3 MB picture, because only the page boxes change. Use Compress PDF to reduce the size.

Why did pdf.js leave out words after I cropped?

pdf.js returned only text inside the visible area: a 10 mm crop removed corner words from its text output, and setting the crop box back to the full page returned them, so the words were still in the file.

My file was already cropped. Does the tool undo that crop?

No. The margins are still counted from the full page, and the new crop box is the part of that area that lies inside the existing one, so the visible area does not grow. A page with a 100 x 141.1 mm crop box stayed 100 x 141.1 mm after a Standard crop, and a page already cropped to 204 x 291 mm became 200 x 287 mm.

What happens with a margin larger than the page?

The visible area stops at 10 points, about 3.5 mm: 200 mm off each side of an A4 page gave a 3.5 x 3.5 mm page.

Can a crop cut into the part an earlier crop left visible?

Yes, where the margins reach into it. On a test page cropped 3 mm on every side, Wide (10 mm) gave 190 x 277 mm, and a Top margin of 40 mm gave 204 x 254 mm: the top moved down, while the other three sides stayed where the earlier crop had put them.

Related Tools