How to Remove or Replace a Background in Photoshop
In this article
Removing or replacing a background in Photoshop is one of the most common editing tasks, whether you're cleaning up a product photo, creating a composite, or preparing an image for a website. This guide walks you through the essential methods—from the quick Select Subject tool to the more precise Pen tool—so you can get a clean cutout every time. You'll need a recent version of Photoshop (CC or later) and a photo with decent contrast between the subject and background.
What You'll Need
- Adobe Photoshop (CC or later; the steps reference the 2023–2024 interface)
- A photo with a clear subject—avoid busy backgrounds for best results
- A new background image or a solid color if you're replacing the original
- A mouse or graphics tablet for precise selections (tablet recommended)
Step-by-Step
- Open your image and duplicate the layer. Go to File > Open and select your photo. In the Layers panel, right-click the Background layer and choose Duplicate Layer. Work on the copy to keep the original intact.
- Make a selection of the subject. Use one of these methods:
- Quick Selection tool (W): Click and drag over the subject. Photoshop automatically expands the selection to edges it detects. Hold Alt (Option on Mac) and paint over areas to remove from the selection.
- Select Subject: With the layer selected, go to Select > Subject. Photoshop uses AI to detect the main subject. This works best with people, animals, or objects that stand out.
- Pen tool (P) for precise edges: If the subject has sharp, clean edges (like a car or a product), use the Pen tool to draw a path around it. Click to create anchor points, and drag to create curves. Close the path, then right-click and choose Make Selection (set Feather to 0.5 px).
- Refine the selection edges. With the selection active, go to Select & Mask (or click the button in the Options bar). In the dialog:
- Use the Refine Edge Brush (the icon with a brush and dotted circle) to paint over hair or fur to capture fine details.
- Adjust Smooth (2–5) to remove jagged edges, Feather (0.5–1) to soften, and Contrast (10–20) to tighten edges.
- Set Output To to Layer Mask and click OK. This adds a mask to your duplicate layer, hiding the background.
- Check the mask. In the Layers panel, you'll see a black-and-white thumbnail next to your layer. White areas are visible, black are hidden. Use the Brush tool (B) with black or white to paint on the mask to hide or reveal parts of the image. Zoom in (Ctrl/Cmd +) to check edges.
- Replace the background (optional). If you want a new background, create a new layer below your cutout layer by clicking the New Layer icon at the bottom of the Layers panel. Fill it with a solid color (Edit > Fill) or drag in a new background image and place it below your subject layer.
- Save your work. Go to File > Save As and choose PSD to keep layers editable. For a final image, use File > Export > Export As and choose PNG (for transparent backgrounds) or JPEG (if you added a new background).
Common Mistakes
- Skipping Select & Mask: Using a raw selection without refining edges leads to halos (white fringes) or cut-off hair.
- Painting on the layer instead of the mask: Make sure you click the mask thumbnail before painting. If you paint on the image itself, you'll permanently alter the photo.
- Using too much feather: A high feather value (like 10) makes edges blurry and unnatural. Keep it under 1–2 unless you want a soft look.
- Forgetting to zoom in: Edges that look fine at 50% zoom often have jagged pixels or leftover background at 200%.
- Not checking the background layer: If you replace the background but still see the old one, you may have forgotten to hide the original Background layer (click the eye icon).
Tips
- For hair, use the Refine Edge Brush in Select & Mask and then choose Decontaminate Colors to remove color fringes from the hair.
- If the subject has a complex edge (like a tree with leaves), try the Magic Wand (W) on a solid background, then invert the selection (Select > Inverse).
- Use a Layer Mask instead of deleting the background—this lets you go back and fix mistakes later.
- When replacing with a new image, match the lighting direction and color temperature so the subject looks natural in the new scene.
- Keyboard shortcut: Press Ctrl/Cmd + J to duplicate a layer, and Ctrl/Cmd + I to invert a mask.
Troubleshooting
- The selection includes parts of the background. Use the Quick Selection tool in subtract mode (hold Alt/Option) to remove those areas, or go back into Select & Mask and use the Brush tool with black to hide them.
- Edges have a white or colored halo. In Select & Mask, increase Shift Edge (negative value like -10) to pull the edge inward. Also try Decontaminate Colors.
- The subject is missing pieces after applying the mask. Paint with white on the mask to reveal those areas. If the mask is too aggressive, lower the brush opacity and build up slowly.
- Select Subject doesn't work well on your image. Use the Quick Selection tool manually, or use the Pen tool for clean edges. For very complex backgrounds, consider using the Object Selection tool (W) and drag a rectangle around the subject.
- The new background looks fake. Add a subtle Gaussian Blur to the background layer (Filter > Blur > Gaussian Blur, 1–3 px) to match the depth of field of your subject, and adjust the subject's brightness/contrast to match.
Frequently Asked Questions
Can I remove a background without losing the original photo?
Yes. Always work on a duplicate layer or use a layer mask. The original Background layer remains untouched, and you can hide or delete it later.
What is the best tool for cutting out hair?
The Select Subject tool combined with the Refine Edge Brush in Select & Mask is the most effective for hair. It captures fine strands, but you may need to manually clean up the mask.
Why does my selection have a blue or green fringe?
That's a color fringe from the original background (chromatic aberration). In Select & Mask, enable Decontaminate Colors and set the output to New Layer with Layer Mask to remove it.
How do I make the background transparent instead of white?
After removing the background, export as PNG. JPEG does not support transparency. In Export As, choose PNG and ensure the Transparency checkbox is ticked.
Can I use the Magic Wand tool instead?
Yes, but only if the background is a solid, uniform color. Set the Tolerance to 30–50, click on the background, then invert the selection. It's faster but less precise than Select Subject.
What if my subject has a shadow I want to keep?
Duplicate the layer, remove the background on the top copy, and on the bottom copy use the Magic Wand to select the shadow only (or use a brush on a mask). Keep the shadow layer below the subject layer with reduced opacity.