How crop PDF works in your browser
Crop PDF removes unwanted areas from the visible region of every page in a PDF — scanner shadows along the gutter, white margins from a slide-export, a watermark band along the top, the page numbers along the bottom, or anything else outside the rectangle you draw. The tool runs entirely in your browser. The PDF.js library renders the first page to a canvas. You drag a rectangle on that canvas. When you click Apply Crop, pdf-lib reads the file, sets the MediaBox and CropBox of every selected page to the rectangle you drew, and saves a new PDF that downloads to your device. Nothing is uploaded to any server.
The crop rectangle is described in PDF points — the coordinate units that pdf-lib uses internally. We compute the conversion from canvas pixels to PDF points using the pdf.js viewport scale of the rendered page. That math is straightforward when the page rotation is zero and gets a small adjustment when the page is rotated 90, 180, or 270 degrees. The visual rectangle you draw is what gets applied — you don't have to think about user-space coordinates or page rotation. We do the conversion, and the cropped output matches what you saw on screen.
Three steps to crop a PDF
- Drop or pick a PDF. The file is parsed by pdf.js in your browser. The first page renders to a canvas at 1.5× scale for crisp visibility, with a fit-width display that adapts to your screen.
- Drag a rectangle on the rendered page. Click-and-drag to draw the crop region. The selection has a translucent fill and a 2px solid border. Eight resize handles appear on the corners and edges. Drag a handle to fine-tune dimensions. Drag inside the rectangle to move it. Live coordinates show in the toolbar in PDF points so you can match a target size precisely.
- Pick the target pages and apply. Choose All pages, a page range like
1-3,5,7-9, or Current page only. Click Apply Crop. The download appears as soon as the cropped PDF is ready — usually under a second for typical files.
Why MediaBox matters as much as CropBox
A PDF page can have up to five bounding boxes: MediaBox (the physical sheet), CropBox (the region a viewer displays), TrimBox (the final trimmed page after print), BleedBox (the area for ink bleed), and ArtBox (the meaningful content area). Most desktop PDF viewers respect CropBox when displaying a page. But mobile renderers, browser-embedded viewers, some headless tools, and many print pipelines fall back to MediaBox. If we only updated CropBox, the crop would look correct in Adobe Reader on Windows but fail on a phone or in a print queue.
Setting both MediaBox and CropBox to the same rectangle makes the crop universal. Every common viewer — desktop, mobile, browser, print — shows the cropped region. The tradeoff: a print pipeline that wanted the original full-bleed sheet would not get it back from the cropped file. That's the right tradeoff for the workflows that crop tools serve. If you need the original full sheet back later, keep a copy of the source PDF; we don't modify it.
When to use crop, when to use a different tool
Crop is the right tool when the unwanted area is on the edge of every page — gutter shadows from a flatbed scanner, header bands with a logo you don't have rights to redistribute, footer page numbers from a copy-pasted source, or wide white margins from an exported slide deck. The crop rectangle is the same on every page, so the operation is one-shot.
Crop is the wrong tool when whole pages need to disappear — for that, use delete PDF pages. Crop is also wrong when a specific patch in the middle of the page needs to be hidden — that's visual redaction, handled by redact PDF. And if the page rotation is wrong (sideways scan), rotate first with rotate PDF pages and then crop the rotated result.
Common crop scenarios
- Scanned bank statements with gutter shadows — flatbed scanners often capture a 0.5-inch dark band along the spine. Crop a thin slice off the left edge to clean every page.
- Slide-deck exports with massive blank margins — PowerPoint and Google Slides exports default to wide whitespace. Crop to the slide content for tighter print and presentation handouts.
- Court-document submissions with required margins — some courts mandate specific margin widths. Crop to the prescribed area, then verify with the court's PDF profile.
- Watermark or logo bands on the top or bottom edge — when a downloaded report has a non-essential header band, crop it out before sharing internally.
- E-reader optimization — Kindle and Kobo readers display PDFs with the original page bounds. Crop a tightly-margined research paper for better reading on a 6-inch screen.
- OCR pre-processing — cleaner page bounds before OCR mean fewer false-positive characters in the margins. Crop, then run OCR for higher-accuracy output.
What happens to text and images outside the crop
The PDF format is a container — text, images, and vector paths live in a content stream attached to each page. When we shrink the MediaBox and CropBox, the content stream still contains the off-page objects, but no renderer draws them because they fall outside the new page bounds. For most workflows this is invisible: the file is smaller (slightly, since the content stream isn't rewritten) and looks correctly cropped in every viewer.
For privacy-critical removal — when the off-page text could be a leak risk if recovered — crop is not the right tool. A determined recipient could enlarge MediaBox in a PDF editor and read the original content. Use redact PDF to bake black rectangles into the page content, or use a desktop tool that performs content-stream surgery for legal-evidence-grade removal. Crop is for visible cleanup, not anti-forensic erasure.
Privacy: why browser-local matters for PDFs
Most online PDF tools upload your file to a server, process it there, and return the result. That works for cat photos. It is not a great idea for bank statements, salary slips, government IDs, contract drafts, medical records, court submissions, or anything else with a real privacy stake. Even reputable services have data breaches; even careful services may be subject to lawful access requests; and even when neither happens, the upload step itself is a copy of your file you don't control.
Browser-local processing flips the model. The PDF stays on your device. The Crop PDF tool loads pdf.js and pdf-lib (about 800KB combined, cached after the first visit), reads the file with the File API, manipulates it in your browser's memory, and writes the result with the Blob API. There is no fetch to any server with the file payload. There is no temporary copy on a worker queue. There is no log line with your file name. Network requests on this page are limited to the framework code (Next.js, React) and the libraries — none of them carry the PDF.
You can verify this. Open your browser's Network tab before dropping a PDF in. Drop it. Click Apply Crop. Download the result. You will see no request that includes your file's bytes — only static asset loads. That's the test for any browser-local tool: if the file shows up in the Network tab, it isn't browser-local.
Limitations and edge cases
- Mixed page sizes — if your PDF has pages of different physical dimensions (e.g., A4 mixed with Letter), the same crop rectangle is applied to all selected pages, clamped to each page's bounds. The output may look slightly different across pages. For more precise per-page crop, run the tool multiple times with different page-range scopes.
- Encrypted PDFs — if the source PDF is password-protected, pdf.js will fail to render and the tool will show an error. Unlock the PDF first using unlock PDF, then crop.
- Form fields outside the crop — AcroForm fields whose visible widget rectangle falls outside the new MediaBox become invisible but stay in the form structure. The form data is preserved, but tabbing through fields may behave unexpectedly. If you're working with a fillable PDF, fill it first, then crop.
- Bookmarks and links — outline entries and link annotations are preserved as-is. Links pointing to coordinates outside the new MediaBox may target empty space. We don't auto-rewrite link annotations to follow the new bounds.
- Very small crop rectangles — the tool enforces a minimum width and height of 4 pixels on the rendered canvas to avoid invalid zero-size MediaBox values. PDF readers reject pages with zero-area MediaBoxes.
Other PDF tools you might need next
After cropping, you might need to merge several cropped PDFs into one document, or compress the file for email. To rotate before cropping, use rotate PDF pages. To remove specific pages instead of cropping the bounds, use delete PDF pages. Every tool on PDF Mavericks runs in your browser — no upload, no signup, free.
Frequently asked questions
What's the difference between cropping, trimming, and resizing a PDF?
Cropping changes the visible page bounds — the content outside the crop box is hidden from the rendered output but the underlying page object stays. Trimming usually means deleting whole pages from the document; that's a different tool (delete-pdf-pages). Resizing changes the physical page size, often by scaling content up or down to fit a new paper size like A4 or Letter. Use crop when you want to remove blank margins, scanner gutter shadows, or strip a watermark band from the edge of every page. Use delete when whole pages need to disappear. Use resize when the printed page size needs to change without losing content.
Why does this tool set both CropBox and MediaBox?
PDF pages have several boxes: MediaBox (the physical page size used by printers), CropBox (the region most viewers display), TrimBox, BleedBox, and ArtBox. Some readers respect CropBox and crop visibly. Others — especially older Acrobat versions, mobile renderers, and some browser-embedded viewers — fall back to MediaBox and ignore CropBox. If we only set CropBox, the crop would look correct in modern Adobe Reader but fail on a phone or in a print pipeline. Setting both guarantees every renderer shows the cropped region. The tradeoff: print pipelines that wanted the original full-bleed sheet won't get it back from the cropped file. For irreversible visual coverage on every viewer, set both — that's what we do.
Can I apply the same crop to every page in one go?
Yes. The default 'apply to' option is All pages. Pick a page range (like 1-3,5,7-9) when only certain pages need cropping — for instance, when a scanner produced consistent margins on most pages but two appendix scans came in at a different size. Pick Current page only when one outlier page needs a unique crop. The crop rectangle you draw is mapped from the rendered canvas back into PDF user-space points, then applied to every selected page's MediaBox and CropBox. If a target page has different physical dimensions, the crop rect is clamped to that page's bounds so the output stays valid.
What happens to the content outside the crop box?
It is no longer visible in any renderer because we shrink both MediaBox and CropBox to the crop rectangle. The underlying PDF objects (text, images, vector paths) for the cropped-out region are still in the file's content stream — pdf-lib doesn't strip them. A determined user with a forensic PDF tool could potentially recover them by enlarging MediaBox back. For most workflows (sharing, archiving, printing), this doesn't matter — every common PDF reader respects the smaller MediaBox and the file looks fully cropped. For privacy-critical removal of off-page content, use redact-pdf or delete-pdf-pages instead.
Are my files uploaded anywhere?
No. The PDF stays on your device — pdf-lib runs in your browser and writes the cropped file using only browser memory. Nothing is sent to a server, no temporary copy, no analytics on the file content. We don't see the file or know what's in it.
Does this work on rotated pages?
Yes. pdf.js renders the page with its rotation applied, and the crop rectangle is computed against that rotated visual frame. We then map the rectangle back into the page's un-rotated user space (which is what pdf-lib's setCropBox and setMediaBox operate in), accounting for 0°, 90°, 180°, and 270° rotations. The cropped output looks the way you'd expect — the visible region matches what you drew, regardless of rotation.
What's the file size limit?
Soft limit around 100 MB for browser memory reasons. The pdf-lib step that writes the cropped PDF is cheap; the cost is the pdfjs render of the first page used for the visual selector. Very large image-heavy PDFs may slow rendering on older devices. The crop logic itself is O(pages) — applying to a 500-page document is still seconds, not minutes.
Can I undo a crop after downloading?
The cropped file you download has new MediaBox and CropBox values. The original file on your device is unchanged. To 'undo,' just re-upload the original and skip the crop, or pick a larger crop rectangle. There is no built-in 'restore original bounds' on the cropped output because we don't store the original bounds inside it; if you need that, keep a copy of the source PDF before cropping.