Background Remover — Make Transparent Backgrounds Free
Remove image backgrounds using a flood-fill algorithm with adjustable tolerance. Click on background areas to select them, preview with checkerboard transparency, and download as PNG with transparent background. Everything runs in your browser.
Background Removal Tool
Upload an image, then click on any background area you want to remove. Adjust the tolerance slider to control how much color variation is included in each selection. Undo mistakes with the undo button. Download the result as a transparent PNG.
Drag & drop an image here, or click to select
Supports JPEG, PNG, WebP — up to 50 MB
How Flood-Fill Background Removal Works
The Flood-Fill Algorithm Explained
Flood fill is one of the oldest and most intuitive algorithms in computer graphics. You have used it every time you clicked the paint bucket tool in any image editor. The algorithm starts at a single pixel — the one you clicked — reads its color value, and then expands outward to all neighboring pixels. For each neighbor, the algorithm checks whether its color is "close enough" to the starting pixel's color. If it is, the neighbor is included in the selection and the algorithm continues expanding from that pixel. If the color difference exceeds the tolerance threshold, the expansion stops in that direction.
The result is a connected region of similarly-colored pixels. In the context of background removal, every pixel in that region is made transparent by setting its alpha channel to zero. The "tolerance" parameter controls the definition of "close enough" — it is the maximum allowed difference between the starting pixel's color and each candidate pixel's color, measured as the Euclidean distance in RGB color space.
Color Distance and the Tolerance Parameter
Each pixel has three color channels: red, green, and blue, each ranging from 0 to 255. The color distance between two pixels is calculated as the square root of the sum of squared differences across all three channels. For example, pure white (255, 255, 255) and a light gray (240, 240, 240) have a distance of about 26. A tolerance of 30 would include that gray in the selection; a tolerance of 20 would not. This mathematical relationship is why tolerance settings are so sensitive — small changes in the slider can dramatically affect which pixels are selected.
The algorithm used in this tool processes the image pixel-by-pixel using the Canvas API's getImageData() method, which provides direct access to the RGBA values of every pixel. The flood fill runs as a breadth-first search using a queue, visiting each pixel at most once for optimal performance. On a typical 1080p image, the algorithm completes in under 100 milliseconds even when selecting large background regions.
Why Some Edges Look Rough
Flood fill operates on exact pixel boundaries, which means it does not handle anti-aliased edges gracefully. Most images have soft, blended edges where the subject gradually transitions into the background over several pixels. The flood fill either includes or excludes each pixel — there is no partial selection. This binary behavior can leave a visible "halo" of background-colored pixels around the subject, or cut into the subject's edges if the tolerance is too high. For best results, start with a low tolerance, remove the bulk of the background, then make additional clicks near edges with a slightly higher tolerance to clean up remaining fragments.
Understanding Tolerance Settings
Low Tolerance (0-30): Precision Mode
Low tolerance values select only pixels that very closely match the clicked pixel's color. A tolerance of 0 selects only pixels that are exactly the same color — useful for digitally generated graphics with perfectly uniform backgrounds. A tolerance of 10-20 handles the minor color variation caused by JPEG compression artifacts on solid backgrounds. Use low tolerance when the background is a single, uniform color (white, solid gray, or a specific brand color) and you want maximum precision around the subject edges.
Medium Tolerance (30-70): General Purpose
Medium tolerance is appropriate for most real-world photographs. Studio backgrounds are rarely perfectly uniform — they have subtle gradients from lighting, shadows near the subject, and color variation from the camera sensor. A tolerance of 40-60 handles these variations while still respecting the boundary between the subject and background. This range is the best starting point for most images. If you find that the selection is leaving patches of background unselected, increase the tolerance. If it is eating into the subject, decrease it.
High Tolerance (70-150): Aggressive Mode
High tolerance values select pixels across a wide range of colors. This is necessary for backgrounds with significant color variation — gradual sky gradients, multi-colored walls, natural outdoor scenes, or backgrounds with complex patterns. The risk is that high tolerance may select pixels within the subject that happen to be similar in color to the background. When using high tolerance, make smaller, more targeted clicks rather than clicking in the middle of a large background area. Click specifically on the problem areas that lower tolerance missed.
Very High Tolerance (150-255): Nuclear Option
Tolerance values above 150 select almost any color, effectively removing everything connected to the clicked region regardless of color similarity. This is rarely useful for background removal because it will almost certainly remove parts of the subject. The only practical use case is removing everything except a subject that is completely surrounded by a thin, clearly-defined edge — and even then, you typically get better results with medium tolerance and multiple clicks.
Which Backgrounds Remove Best
Ideal: Solid Color Backgrounds
Pure white, solid gray, and chroma key green or blue backgrounds produce the cleanest results. A single click with tolerance 20-40 typically removes the entire background in one operation. Product photography on white backgrounds, headshots on gray backdrops, and video production green screens all fall into this category. If you control the shooting environment, using a solid, uniform background is the single most effective way to ensure clean background removal.
Good: Simple Gradient Backgrounds
Studio backgrounds with soft lighting gradients work well with medium tolerance (40-60). You may need 2-3 clicks in different areas to capture the full range of the gradient. Shadows near the subject's edges may require separate clicks with slightly higher tolerance. The key is that the background colors remain distinctly different from the subject — even if the background varies from light gray in the center to medium gray at the edges, it is still separable from a human subject wearing colored clothing.
Challenging: Complex Natural Backgrounds
Outdoor scenes, interior rooms, and any background containing multiple colors and textures require many clicks and careful tolerance adjustment. Each distinct background area needs to be selected separately. The tool works incrementally — each click adds to the total removed area — so you can systematically work through complex backgrounds one section at a time. These scenarios typically require 10-20 clicks with varying tolerance settings and may benefit from the undo function to recover from overshooting.
Difficult: Color Overlap Between Subject and Background
When the subject and background share similar colors — a person in a white shirt against a white wall, or a green plant against a green background — flood fill cannot reliably distinguish between them. The algorithm has no concept of "subject" or "object" — it only sees color similarity. In these cases, use the lowest tolerance that selects any background at all, make precise clicks in areas far from the subject, and accept that you may not achieve a perfectly clean result without manual pixel-level editing.
What to Do After Removing the Background
Saving as Transparent PNG
Always download your result as PNG. JPEG does not support transparency — if you save a background-removed image as JPEG, the transparent areas will be filled with white (or black, depending on the software). PNG preserves the alpha channel, which stores the transparency information for each pixel. The resulting file will be larger than a JPEG because PNG uses lossless compression, but the transparency information is preserved perfectly.
Using Your Transparent Image
Transparent PNG images can be placed on any background in design software, presentation tools, and web pages. Common uses include compositing subjects onto new backgrounds, creating product images for e-commerce listings, building social media graphics, and preparing images for presentations. In HTML, simply use the PNG file in an <img> tag — the transparent areas will show whatever is behind the element, whether that is a solid color, a gradient, another image, or a video.
Cleaning Up Edges
If the flood fill left a slight halo around the subject, you can refine the edges in any image editor that supports eraser tools. Open the transparent PNG, zoom to 200-400%, and manually erase the remaining background pixels along the edges. For a softer, more natural look, use a soft-edged eraser to feather the transition. This post-processing step takes 2-5 minutes and dramatically improves the quality of the cutout.
Advanced Background Removal Techniques
The Incremental Approach
Rather than trying to remove the entire background in a single click, use an incremental strategy. Start with low tolerance (15-25) and click the most uniform area of the background — usually the center. This removes the easy part. Then increase tolerance to 30-40 and click on remaining background patches that have slight color variation. Continue increasing tolerance and clicking smaller areas until only edge pixels remain. This approach takes more clicks but produces far cleaner results than a single high-tolerance click.
Working with Shadows
Product photography often includes natural shadows that extend from the subject onto the background. Decide before you start whether you want to keep or remove the shadows. Shadows that touch the subject will be partially preserved at low tolerance settings because they blend into the subject. If you want a completely shadow-free cutout, increase tolerance near the subject's base. If you want to preserve some shadow for a natural look, keep the tolerance lower in those areas and click only on the pure background regions away from the shadow.
Handling Hair and Fine Detail
Hair, fur, and other fine details are the most challenging elements in background removal because individual strands are partially transparent and blend with the background at the pixel level. Flood fill cannot handle these edges well because each strand pixel is a mix of hair color and background color. For portraits and pet photos, expect some loss of fine hair detail around the edges. The best mitigation is to shoot against a strongly contrasting background (a person with dark hair against a white background, or light hair against a dark background) so the color distance between hair and background is maximized.
Combining with Other Tools
For best results, use background removal as one step in a multi-tool workflow. First, crop the image to remove unnecessary areas using our crop tool. Then remove the background using this tool. Finally, compress the transparent PNG using our compressor in PNG mode to minimize file size. This three-step workflow produces optimized, transparent images ready for any use case.
Frequently Asked Questions
When you click on a pixel, the algorithm reads its color and spreads outward to all connected pixels whose color is within the tolerance threshold. Those matching pixels are made transparent. Higher tolerance includes more color variation (better for gradients and shadows). Lower tolerance is more precise (better for uniform backgrounds). Each click adds to the removal — you can make multiple clicks to progressively remove more background.
For solid-color backgrounds (white, green screen), use tolerance 20-40. For backgrounds with slight gradients or lighting variation, use 40-70. For complex backgrounds with significant color shifts, use 70-100 and make multiple smaller clicks. Start low and increase gradually — you can always undo and try a higher value.
Yes. Each click removes a separate connected region of similar color. If your background is divided by the subject (for example, visible on both sides of a person), click each separate background area individually. The tool accumulates all removed areas into a single transparent result that you can download as one PNG.
It does not. The checkerboard pattern is only shown in the preview to indicate which areas are transparent. The downloaded PNG file contains proper alpha transparency. When you open it in a photo editor or place it on a web page, the transparent areas will show whatever is behind the image — not a checkerboard.
No. This tool uses a classic flood-fill algorithm based on color similarity. You manually click the areas you want to remove and control the tolerance. This gives you precise control over exactly what gets removed. It works best for images with distinct background colors. For complex scenes where the background and subject share similar colors, AI-based tools may produce better automatic results, but they run on remote servers rather than in your browser.