How to use Trim Image Whitespace
- Choose up to 20 JPEG, PNG or WebP images, within 64 MiB per file, 128 MiB and 40 megapixels combined.
- Leave Border color on the top-left pixel, or set the paper or background color that your scan uses.
- Raise the tolerance when the border is not perfectly even, lower it if pale content is being trimmed away, and add padding when the cut needs a little breathing room.
- Select Trim borders, inspect the reported dimensions and download the copies. A batch includes individual files and one ZIP.
Example: Trim Image Whitespace
A white scan or screenshot with a wide margin around the one block of content.
Options
- Border color
- The default compares every pixel with the top-left pixel, which is the usual white or coloured margin. Choose a color when the border is a paper shade that the corner pixel does not represent, such as a scan with a printed header.
- Tolerance
- The largest channel difference that still counts as border. Flat digital artwork trims at the default of 8. Check the four edges of the result: raise the number when a soft or uneven margin is left behind, and lower it when pale content near the edge is being absorbed into the border.
- Padding
- Padding expands the crop into the existing surrounding pixels; it does not create a new blank border. It is clamped to the original image edges. If it restores the full frame, the tool asks you to lower it.
- Output format
- Auto keeps the source format. PNG stores the cropped browser-decoded pixels losslessly; JPEG and WebP use the quality setting. File size depends on the picture and encoding, so compare the actual result.
Supported inputs and limits
- Up to 20 JPEG, PNG or WebP images, 64 MiB each, 128 MiB and 40 megapixels combined.
- Batch outputs are capped at 128 MiB.
- Every pixel is compared with the top-left pixel or chosen color, including alpha.
- A difference above the tolerance marks content; the smallest rectangle containing all content is kept.
- Noise or a dark speck in a margin can prevent trimming, while too much tolerance can discard pale content.
More details
Padding of 0–200 pixels retains more of the original surrounding area and stops at the image edges.
Entirely matching images, full-frame content and padding that restores the full frame are refused.
A refusal stops the batch; try that file separately.
The crop is encoded from browser-decoded pixels.
PNG avoids further lossy encoding, but source metadata and original file structure are not preserved.
JPEG/WebP encoding can alter detail;
JPEG fills transparency white.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
One speck can keep a wide margin
The tool scans the whole image for pixels unlike the reference color. A single dark mark near an edge can expand the bounding rectangle and keep a wide margin. Crop unwanted marks first when possible. Raising tolerance may ignore faint noise, but can also remove pale text or lines, so inspect all four edges.
Questions about Trim Image Whitespace
How does the tool decide where the content starts?
It walks the pixels and keeps the smallest rectangle that holds every pixel differing from the border color. The margin above, below, left and right is whatever falls outside that rectangle.
Nothing happened. Why?
If every pixel matches the border color, try a lower tolerance or a different reference color so the content remains distinguishable. If content reaches all four edges, there is no removable margin. Padding can also restore the full image extent; lower it and try again.
Will a slightly uneven gray border still trim?
Yes, within the tolerance you set. The comparison allows a difference of up to that number in each of the red, green, blue and alpha channels. Start at the default of 8, inspect the edges of the result, and raise it only as far as the margin needs.
Does trimming change the picture itself?
The output removes outer rows and columns and re-encodes the crop. PNG avoids additional lossy compression of the browser-decoded pixels. JPEG and WebP can change detail during encoding. Color-profile handling can also affect decoded values, and source metadata is not copied.
Part of my picture disappeared. Why?
The tolerance was wide enough for pale content near the edge to count as border. Lower the tolerance and run again, or set the border color to the exact shade of the margin so the comparison has a narrower target.