Auto-detect and remove white borders from every page. Great for scanned PDFs.
Drop your PDF here
or click to select
Choose a fileWorks best on scanned documents
This tool automatically detects and removes white borders from every page of your PDF using PDF.js for rendering and pdf-lib for applying the crop. It finds the outermost non-white pixels on each page and trims the page boundary to match the content area. No manual adjustment is needed. No file is uploaded. The entire operation runs in your browser.
Drop your PDF into the upload area. Choose a sensitivity level and an optional padding value, then click Crop Margins and Download. The tool renders each page to a canvas, scans the pixel data to find the content boundary, then applies a new crop box to each page using pdf-lib. The result downloads as a new PDF with tighter page boundaries throughout the document.
The padding setting adds a small buffer around the detected content area. A 5-pixel padding is the default. It prevents the crop from cutting too close to the edge of text or graphics. Set it to 0 for the tightest possible crop, or increase it if you want to keep a thin margin around the content.
Auto crop works by detecting where the content actually is on each page. The tool finds the first and last non-white pixels in each row and column, then sets the crop boundary just outside that area. This is fast and works well when the content is clearly distinct from a white background.
Manual cropping lets you set exact pixel or millimeter coordinates for each side of the page. Use the Crop PDF tool when you need precise control, want to crop to a specific size, or need all pages cropped to identical dimensions regardless of content position. Auto crop is best when pages vary and you want each one trimmed to its own content boundary.
Auto margin removal solves several real problems. Scanned documents often have wide, uneven borders left by the scanner bed. The scanner frame adds white space that isn't part of the original document. Auto crop removes those borders cleanly without any manual measurement.
Exported reports and academic papers frequently include large default margins set by the source application, typically 2-3 centimeters on each side. When reading these documents on a tablet or e-reader, those margins waste screen space. Auto crop tightens the page to the actual text area, making the content larger and more readable on smaller screens.
Another common use is preparing PDFs for tight printing, where you want content to fill the page without unnecessary white space around it.
The tool renders each PDF page to an HTML canvas element at 1.5x scale using PDF.js. It then reads the pixel data from that canvas and scans every row and column. The scan looks for pixels where any of the RGB channel values falls below a threshold you control. The default threshold treats pixels with RGB values above 230 as "near-white" and ignores them. The first and last rows and columns that contain non-white pixels define the content bounding box. That box, scaled back to PDF coordinates, becomes the new crop boundary for the page.
Auto-detection can't help if the actual content extends to the edge of the page. In that case, there are no white margins to detect. The tool either returns the original page size unchanged, or may trim a tiny amount of content if the scan finds variation near the border. For documents where content fills the full page, use the manual Crop PDF tool to specify exact crop dimensions instead.