What a layer mask does and when to use one
A layer mask in Photoshop is a grayscale image attached to a layer that controls which parts of that layer show and which parts hide. You paint on the mask with black to hide, white to show, and gray to make parts semi-transparent. The layer itself stays unchanged — the mask is just instructions for what to display.
Layer masks are useful when you need to blend two images together, erase part of a photo without permanently deleting pixels, or create a gradual fade from one layer to another. Unlike the eraser tool, which permanently removes pixels, a mask is non-destructive: you can always paint white back onto the mask to reveal what you hid.
The most common use is combining photos — for example, placing a person from one photo into a background from another, or fading one image into another. Masks let you do this smoothly without losing the original image data.
Key Takeaways
- Add a layer mask by right-clicking the layer and choosing Add Layer Mask, then choose whether to start with white (everything visible) or black (everything hidden).
- Paint on the mask with black to hide parts of the layer and white to reveal them; gray creates semi-transparent areas.
- Use the Brush tool with soft edges to create smooth transitions between masked and unmasked areas.
- View the mask itself by Alt-clicking (Windows) or Option-clicking (Mac) the mask thumbnail in the Layers panel to troubleshoot edges and coverage.
- Masks are non-destructive, so you can always paint over them to undo your hiding or revealing without losing the original image.
How to add a layer mask to an existing layer
Open your image in Photoshop and make sure the layer you want to mask is selected in the Layers panel on the right side of the screen. Right-click directly on the layer thumbnail (the small preview image of your layer) and a menu will appear.
Click Add Layer Mask from that menu. A dialog box will ask you to choose a starting state. Select White (Full Opacity) if you want everything on the layer to be visible at first and you'll paint black to hide parts. Select Black (Full Transparency) if you want to start with the layer completely hidden and paint white to reveal parts. For most blending work, start with white.
After you click OK, a white rectangle will appear next to your layer thumbnail in the Layers panel. This white rectangle is your mask. The layer thumbnail shows your image; the mask thumbnail shows what's controlling visibility. You're now ready to paint on the mask.
Painting on the mask with the right brush settings
Select the Brush tool from the toolbox on the left (or press B). Make sure your foreground color is set correctly: black to hide, white to reveal. You can press X to swap foreground and background colors quickly.
Before you start painting, adjust your brush settings. In the top toolbar, set the Opacity to 100% for a hard edge, or lower (like 50%) for a softer fade. More importantly, make sure Hardness is set low — around 0% to 30% — so your brush has soft, feathered edges. Hard brushes create visible lines where the mask transitions; soft brushes blend smoothly.
Paint directly on your image. The mask thumbnail in the Layers panel will update as you paint, showing white where you painted and black where you didn't. If you make a mistake, just paint the opposite color to undo it. The original image is never damaged.
Checking your mask and fixing rough edges
As you work, you may notice hard edges or areas where the mask isn't quite right. To see the mask itself instead of the image, Alt-click (Windows) or Option-click (Mac) the mask thumbnail in the Layers panel. The canvas will show the mask as a grayscale image: white areas are visible, black areas are hidden, and gray areas are semi-transparent.
While viewing the mask, you can paint to refine it. Use a soft brush and lower opacity to feather edges more gradually. When you're done checking, Alt-click or Option-click the mask thumbnail again to return to normal view and see your blended result.
If you need to soften the entire mask edge at once, right-click the mask thumbnail and choose Mask Edge. This opens a dialog where you can feather the mask, adjust the contrast, or shift the edge — useful for cleaning up selections that became masks.
Using a selection to create a mask automatically
You don't have to paint a mask from scratch. If you've already made a selection using the selection tools (like the Free Select tool or Quick Selection tool), you can convert that selection into a mask instantly.
With your selection active and your target layer selected, right-click the layer and choose Add Layer Mask. Instead of choosing a starting state, check the box that says Selection. Photoshop will create a mask based on your selection: the selected area becomes white (visible) and everything outside becomes black (hidden).
This is much faster than painting by hand when you're working with a clear boundary, like cutting out a person from a background. You can still refine the mask afterward by painting on it.
Adjusting mask density and feathering after creation
Once your mask exists, you can adjust how strong it is without repainting. Right-click the mask thumbnail and choose Mask Options. The Density slider controls how opaque the mask is overall — lower density makes the hidden areas more visible, like turning down the strength of your masking.
The Feather option softens the entire mask edge by a set number of pixels. This is useful if your mask edge looks too sharp after you've finished painting. Enter a value like 5 to 10 pixels for a subtle softening, or higher for a more dramatic fade.
These adjustments affect the whole mask at once. If you need to adjust only part of the mask, go back to painting with the Brush tool instead.
Removing or disabling a layer mask
If you decide you don't need the mask anymore, right-click the mask thumbnail in the Layers panel. Choose Delete Layer Mask to remove it permanently, or choose Disable Layer Mask to turn it off temporarily without deleting it. A disabled mask shows an X over the mask thumbnail.
You can also right-click and choose Apply Layer Mask to permanently merge the mask with the layer. This converts the mask into actual transparency on the layer itself. Use this only when you're certain you won't need to edit the mask again, because applying it removes the non-destructive benefit.
Frequently Asked Questions
Can I use a layer mask on a background layer?
No. Background layers in Photoshop don't support transparency or masks. Right-click the Background layer and choose Convert to Layer first. This removes the "Background" label and allows you to add a mask and create transparent areas.
What's the difference between a layer mask and the eraser tool?
The eraser tool permanently deletes pixels from your layer. A layer mask hides pixels without removing them, so you can always paint white on the mask to bring them back. Masks are non-destructive and give you more control over blending.
How do I make a smooth fade between two layers using a mask?
Add a layer mask to the top layer and use the Gradient tool instead of the Brush. Set your foreground to black and background to white, then drag the gradient tool across the area where you want the fade. This creates a smooth transition from hidden to visible.
Can I copy a mask from one layer to another?
Yes. Right-click the mask thumbnail on the layer that has the mask you want to copy, choose Copy Layer Mask, then right-click another layer and choose Paste Layer Mask. The mask will be copied exactly to the new layer.
Why does my mask look inverted?
You may have painted with the wrong color. Press X to swap your foreground and background colors, then paint over the problem area with the opposite color. If the entire mask is inverted, right-click the mask thumbnail and choose Invert to flip it.