What a layer mask does and when to use it
A layer mask in Photoshop lets you hide or show parts of a layer without permanently deleting anything. Instead of erasing pixels, you paint black on the mask to hide areas and white to reveal them again. This means you can change your mind later — erase the mask entirely and the layer returns unchanged.
Layer masks are useful when you want to blend two images together, fade out edges, create complex selections without cutting, or reveal different parts of a layer at different times. Because nothing is actually deleted, you keep all your original image data and can undo any masking decision.
Key Takeaways
- Right-click any layer in the Layers panel and choose "Add Layer Mask" to create a mask that starts fully white (everything visible).
- Paint with black on the mask to hide parts of the layer, and paint with white to reveal them again — the layer itself stays untouched.
- A layer mask appears as a white rectangle next to the layer thumbnail in the Layers panel, and you must click it to paint on it rather than the layer.
- You can delete a mask by right-clicking it and choosing "Delete Layer Mask", or apply it permanently by choosing "Apply Layer Mask".
Adding a layer mask to an existing layer
Open your image in Photoshop and locate the layer you want to mask in the Layers panel on the right side of the screen. If the Layers panel is not visible, go to Window > Layers to open it.
Right-click directly on the layer name or thumbnail and a menu appears. Select "Add Layer Mask" from the options. A dialog box opens asking how you want to start the mask. Choose "White (Full Opacity)" to begin with the entire layer visible, which is the most common starting point. Click "OK".
A white rectangle now appears next to your layer thumbnail in the Layers panel. This white rectangle is your mask. The white border around it indicates the mask is currently selected and ready to use. If you click the layer thumbnail instead of the mask, you will paint on the layer itself rather than the mask.
Painting on the mask to hide and reveal
Make sure the mask is selected by clicking the white rectangle in the Layers panel — you should see a white border around it. Select the Brush tool from the toolbox on the left (or press B on your keyboard).
Check your foreground and background colors at the bottom of the toolbox. The foreground color should be black to hide parts of the layer. If it is not, press D to reset to black foreground and white background, then press X to swap them if needed.
Paint over the areas of the layer you want to hide. As you paint with black, those parts become transparent and reveal whatever is below (another layer, the background, or transparency). If you paint over an area by mistake, switch to white (press X to swap foreground and background colors) and paint over it to reveal that part of the layer again.
Adjust your brush size and hardness as needed. A soft brush creates a gradual fade, while a hard brush creates a sharp edge. You can paint multiple times over the same area to gradually fade it in or out by using gray tones instead of pure black or white.
Viewing and adjusting your mask
To see the mask itself as a grayscale image, hold Alt (Windows) or Option (Mac) and click the white mask rectangle in the Layers panel. The canvas shows the mask in black and white instead of your image. Black areas are hidden, white areas are visible, and gray areas are partially transparent. Hold Alt or Option and click the mask again to return to normal view.
To temporarily disable the mask without deleting it, right-click the mask rectangle and choose "Disable Layer Mask". A red X appears over the mask thumbnail, and the entire layer becomes visible again. Right-click and choose "Enable Layer Mask" to turn it back on.
If you want to refine the mask edges, use the Refine Mask button in the Properties panel (Window > Properties if it is not visible). This opens a dialog where you can adjust feathering, contrast, and edge detection to smooth or sharpen your mask boundaries.
Starting a mask from a selection or channel
You do not have to start with a blank white mask. If you have already made a selection using the selection tools, you can convert it directly to a mask. With your selection active, right-click the layer and choose "Add Layer Mask". In the dialog, select "Selection" instead of "White (Full Opacity)". The selected area becomes white (visible) and everything outside becomes black (hidden).
You can also create a mask from a layer's transparency. If your layer already has transparent areas, right-click it and choose "Add Layer Mask", then select "Transparency" in the dialog. The transparent areas become black on the mask and the opaque areas become white.
Applying or removing a mask permanently
Once you are satisfied with your mask, you can make it permanent by applying it. Right-click the mask rectangle in the Layers panel and choose "Apply Layer Mask". The mask merges with the layer, and the hidden areas are now permanently deleted. The mask thumbnail disappears from the Layers panel.
If you want to remove the mask without applying it — returning the layer to its original unmasked state — right-click the mask and choose "Delete Layer Mask". A dialog asks whether to delete or apply the mask. Choose "Delete" to discard the mask entirely and restore full visibility of the layer.
Common mistakes and how to avoid them
The most common mistake is painting on the layer instead of the mask. Always check that the mask rectangle has a white border around it in the Layers panel before you start painting. If you accidentally paint on the layer, press Ctrl+Z (Windows) or Command+Z (Mac) to undo and click the mask to select it.
Another mistake is forgetting that black hides and white reveals. If you are painting and nothing is disappearing, check your foreground color. Press D to reset to black foreground if you are unsure.
If your mask edges look too harsh, you painted with a hard brush. Select the mask again, choose the Brush tool, increase the Hardness value in the tool options (set it lower for softer edges), and paint over the edge again to soften it. You can also use the Blur tool directly on the mask to soften edges after the fact.
Frequently Asked Questions
Can I use a layer mask on a background layer?
No. Photoshop does not allow masks on background layers because background layers do not support transparency. Right-click the background layer and choose "Convert to Layer" first, then you can add a mask. The layer will be renamed and gain transparency support.
What happens if I copy a layer that has a mask?
The mask copies along with the layer by default. When you paste or duplicate a masked layer, both the layer and its mask come over together. If you want to copy only the layer without the mask, right-click the mask and choose "Delete Layer Mask" before copying, or paste the layer and then delete its mask afterward.
Can I paint with colors other than black and white on a mask?
Yes. Gray tones create partial transparency — darker gray hides more, lighter gray hides less. This creates smooth fades and soft edges. Pure black and white are just the extremes. You can also use the Eraser tool directly on a mask, which paints with black and gradually hides the layer.
How do I move a mask to a different layer?
Right-click the mask rectangle and choose "Delete Layer Mask", then choose "Apply" to save the mask as permanent changes. Alternatively, drag the mask thumbnail onto another layer in the Layers panel. A dialog asks whether to replace that layer's mask or add the mask to the layer.