Overview
Introduction
This tool crops a uniform-thickness border off every edge of a PNG image, entirely client-side.
It's the direct inverse of the border adder tool, useful for trimming padding, scan artifacts, or a frame that's no longer wanted.
What Is PNG Border Remover?
A client-side PNG cropping tool that reads an uploaded image's pixel data and copies out the interior region, excluding a fixed-thickness strip from every edge.
The output canvas shrinks by exactly twice the thickness in both width and height.
How PNG Border Remover Works
The tool computes the new, smaller canvas dimensions by subtracting twice the thickness from the original width and height, then copies each interior pixel to its new position, offset by the thickness in both directions.
If the resulting dimensions would be zero or negative, it returns an error rather than attempting an invalid crop.
When To Use PNG Border Remover
Use it to trim a scanned document's dark edge margin, remove a border you no longer want, or undo a border that was added by another tool or process.
It's also useful for stripping consistent padding from a batch of images that all share the same frame thickness.
Often used alongside PNG Border Adder and PNG Rectangle Fitter.
Features
Advantages
- Runs entirely client-side; the uploaded image is never sent to a server.
- Simple, predictable behavior: the same thickness comes off every edge.
- Pairs directly with the border adder tool as an exact inverse operation.
Limitations
- Only a uniform thickness on all four sides is supported; it can't trim different amounts per edge in one pass.
- It doesn't detect a border automatically — you must know or measure the thickness to remove.
Examples
Best Practices & Notes
Best Practices
- Use the dimensions finder tool first to confirm your image's exact size before choosing a crop thickness.
- If you're not sure of the exact border thickness, start conservative (a smaller value) and re-run if needed — cropping too much can't be undone without the original file.
Developer Notes
removeBorderFromPng is a pure lib function operating on a plain Uint8ClampedArray PixelBuffer: it validates the requested thickness leaves at least a 1x1 result, then copies the interior region into a freshly allocated, smaller buffer — no DOM access until the component paints the result for preview/download.
PNG Border Remover Use Cases
- Cleaning up a scanned document's dark edge margin
- Undoing a border added by the border adder tool
- Stripping consistent padding from a batch of similarly-framed images
Common Mistakes
- Setting a thickness larger than half the image's smaller dimension, which leaves nothing after cropping and triggers a validation error.
- Assuming the tool can detect and remove an irregular or non-uniform border automatically — it always trims a fixed thickness you specify.
Tips
- Pair with the border adder tool to quickly experiment with different frame thicknesses on the same source image.
- Check the result's new dimensions against your expectations before downloading, especially on images you can't easily re-upload.