Trim whitespace and borders
Trim the white space or plain border around a screenshot or scan automatically, free and in your browser with no upload. The border color is detected for you, and a tolerance setting handles edges that are almost one color.
Finds the edges of the actual content and crops to them. Useful for screenshots and scans with margins.
In detail
Trim finds the plain border around an image, such as the white margin on a screenshot or the empty edge on a scan, and crops it away. The border color is taken from whichever of the four corners repeats most often, then each edge walks inward until it meets a row or column holding a pixel that differs by more than your tolerance, which runs from 0 (exact) to 64.
Each file is measured once when you add it, so dragging the tolerance re-detects the edges without reading the pixels again. Fully transparent pixels can count as border too, which makes it just as useful for cutting the empty space off a transparent PNG.
Trim whitespace and borders at a glance
- Input
- JPG, PNG, WebP, AVIF, HEIC, GIF (first frame), BMP, TIFF, SVG and other image formats
- Output
- The original format, WebP, PNG or JPEG
- What it does
- Automatic border detection from the corners
- Tolerance from an exact match up to 64
- Transparent pixels can count as border
- Positive or negative padding
- Batch trimming with one ZIP download
- Who it is for
- Anyone cleaning up screenshots, scans, product shots or transparent PNGs with empty space around them.
- Limits
- Images over 32 megapixels are passed through without trimming.
- The border has to be close to one color; a busy background is not trimmed.
- Privacy
- Runs entirely in your browser: no file is uploaded, and nothing is kept after you close the tab.
How to trim whitespace from an image
- Drop your images Files are measured as they arrive. The readout in the rail fills in with the detected content box, a diagram of it, and the pixels cut from each edge.
- Set the tolerance Zero means an exact color match. Raise it for scans and photographs, where the border is nearly but not quite one color. It starts at 8.
- Decide how transparency counts "Treat transparent as empty" is on by default, so fully transparent pixels are border whatever color sits under them. Turn it off to judge the border by color alone.
- Add padding if you want it Positive padding leaves pixels around the content; negative padding cuts into it, and the page tells you by how much.
- Apply and download Press Apply, then download. One file saves directly; a batch arrives as a zip.
Trim whitespace and borders: common questions
What happens if an image has no uniform border?
Nothing is cut, and the page says so by name — "has no uniform border at a tolerance of 8" — and suggests raising the tolerance so near-matches count as border. The file still goes through the pipeline, so a format change applied to the batch is not silently skipped for it.
Is there a size limit on what can be trimmed?
Yes. Detecting a border needs the whole image in memory at once, so anything over 32 megapixels is not measured and passes through unchanged, with a message giving its megapixel count. An image that is a single flat color keeps one pixel rather than becoming an empty file.
How does it work out which color the border is?
It reads all four corners and takes whichever color repeats most, with a four-way tie going to the top-left. A single stray pixel in one corner — a rounded window shadow, a scanner artifact — then costs a pixel of crop instead of breaking the detection entirely.