Automatically trim white margins
Automatically detect and remove uniform borders (white or a given color) surrounding the actual content of an image, without having to manually crop with pixel precision.
How it works
The tool inspects each row and column of pixels starting from all four edges of the image: as long as an entire row or column remains within the color tolerance you set relative to the border color (white by default, or a color you choose), it is considered a margin and removed. Cropping stops as soon as a row or column contains a different pixel, fully preserving the useful content.
What if the background isn't perfectly uniform (noise, JPEG compression)?
Increase the tolerance: a JPEG-compressed or scanned image often has slight color variations in the margins that prevent an exact match. A tolerance of 10 to 30 absorbs this noise while still correctly detecting the start of the content.
Can the tool remove a border color other than white?
Yes — uncheck automatic detection and choose the exact border color to remove. This is useful for screenshots or scans with a colored background (light gray, beige, etc.) rather than pure white.
100% local processing: margin detection and cropping are performed directly in your browser — your image is never sent to a server.