How to use Trim Image Whitespace
- Choose one JPEG, PNG or WebP image, up to 64 MiB and 40 megapixels.
- Leave Border colour on the top-left pixel, or set the paper or background colour 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, compare the reported sizes and download the trimmed copy.
Example: Trim Image Whitespace
A white scan or screenshot with a wide margin around the one block of content.
Options
- Border colour
- The default compares every pixel with the top-left pixel, which is the usual white or coloured margin. Choose a colour 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
- Blank space added around the content after the border is removed, measured in pixels. It is held inside the image, so padding larger than the margin gives back the whole picture and the run is refused instead.
- Output format
- Auto keeps the source format. PNG is lossless and suits flat pages, JPEG is smaller for a photograph, and WebP is usually lighter than PNG. The quality setting applies to JPEG and WebP only.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Why the scan stops at the first differing pixel
The rectangle grows from the outermost pixel that differs from the border colour, so a single speck of dust in the margin keeps a whole row of empty paper in the result. Cropping that speck away first, or raising the tolerance until a faint speck counts as border, is usually faster than trimming twice.
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 colour. The margin above, below, left and right is whatever falls outside that rectangle.
Nothing happened. Why?
The whole image already matches the reference colour within the tolerance, so there is no border to remove and the run is refused with that message. If the picture has a real border, raise the tolerance or set the border colour yourself.
Will a slightly uneven grey 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 crop removes the outer rows and columns. What happens to the pixels that stay depends on the format: a PNG copy keeps them lossless, while a JPEG or WebP copy is encoded again and the kept area can differ slightly. The file size usually changes, and embedded metadata is not carried over.
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 colour to the exact shade of the margin so the comparison has a narrower target.