Solid background transparency
Remove a chosen solid color from border-connected areas or every matching pixel.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Choose a background color and tolerance, then clear its alpha in a static image. Border mode protects matching colors enclosed by foreground; all-matching mode also clears those enclosed colors. Compare the decoded original and result on checkerboards.
How to use this tool
- Select the static image and enter the exact six-digit background color.
- Choose border-connected or all-matching pixels; increase tolerance only after checking foreground edges.
- Compare the decoded original and transparent result, then download transparent.png and its report.
Supported inputs and limits
One static PNG, JPEG or WebP up to 20 MiB and 16 million pixels. GIF, animated WebP/APNG and corrupt files are rejected. The output is a PNG; metadata is not retained.
Matching uses the maximum RGB channel distance from #RRGGBB, within tolerance 0–255. Border mode uses four-neighbor connectivity, including already-transparent pixels. Only selected alpha values become zero; other decoded RGB/alpha values remain. Basic 8-bit RGB/RGBA PNG uses original pixel bytes; other variants/formats use browser decoding and color/orientation behavior, which can alter pixels from the encoded source.
Worked example
Example input
A 7×7 RGBA fixture with a white border, black enclosing ring, nine enclosed white pixels and one already-transparent border pixel.
Example options
{"color":"#ffffff","tolerance":0,"mode":"border"}Example output
Border mode clears 23 opaque pixels and preserves the nine enclosed whites; all-matching clears 32 opaque pixels.
When something does not work
Use #RRGGBB and a whole tolerance from 0 to 255. Choose a static supported image within the pixel limit. If foreground disappears, lower tolerance or switch to border-connected mode and compare again.
Frequently asked questions
Does border mode remove a white hole inside a logo?
A fully enclosed matching region is preserved. All-matching mode clears it. Connectivity is four-neighbor, so a diagonal contact alone is not a connection.
Can this remove a natural photo background?
This is a chosen-color mask, without object recognition or hair matting. Similar foreground colors can be cleared when connected or when all-matching is selected.
Why do JPEG edges need tolerance?
Compression can move near-white colors away from pure white. Check the preview before increasing tolerance; every selected pixel becomes fully transparent, without feathering.