If you have ever erased part of a photo and then wished you could get it back, layer masks are for you. A mask is a black-and-white “stencil” attached to a layer. It decides which parts of that layer are visible, and it never deletes anything. Almost every composite, product mockup and social graphic I build in Photoshop relies on masks.
How a layer mask works
A layer mask is a greyscale image that sits next to the layer thumbnail in the Layers panel. Photoshop reads it with one simple rule:
- White reveals the layer.
- Black hides the layer.
- Grey partly hides it, so the darker the grey, the more transparent the result.
Because the original pixels stay untouched, you can change your mind at any point. That is the whole idea of non-destructive editing.
Step 1: Add a layer mask
- Select the layer you want to mask in the Layers panel.
- Click the Add layer mask button (the rectangle with a circle) at the bottom of the panel.
- A white thumbnail appears next to your layer. White means everything is still visible.
Pro tip: Hold Alt (Windows) or Option (macOS) while clicking Add layer mask to create a black mask that hides everything. It is handy when you only want to reveal a small area.
Step 2: Paint on the mask
- Make sure the mask thumbnail is selected (it gets a thin frame), not the image thumbnail.
- Choose the Brush tool (B) and use a soft, round brush.
- Press D to reset to black and white, then X to swap between them.
- Paint with black to hide areas, and with white to bring them back.
Lower the brush opacity or flow to build up soft, gradual blends. This is how you fade one photo into another, or make a shadow fall naturally behind a product.
Step 3: Make fast, accurate masks with selections
Painting by hand is great for blends, but for cut-outs let Photoshop do the heavy lifting:
- Go to Select > Subject. Photoshop’s AI detects the main subject.
- With the selection active, click Add layer mask. Everything outside the selection is hidden.
- To refine edges, choose Select > Select and Mask. Use Refine Hair or the Refine Edge Brush on hair and fur, then output to a new layer mask.
Useful mask shortcuts
| Action | Windows | macOS |
|---|---|---|
| View the mask on its own | Alt + click mask thumbnail | Option + click mask thumbnail |
| Turn the mask off and on | Shift + click mask thumbnail | Shift + click mask thumbnail |
| Invert the mask | Ctrl + I | Cmd + I |
| Default colours / swap colours | D / X | D / X |
Layer masks vs clipping masks
A layer mask controls the visibility of one layer. A clipping mask uses the shape of the layer below to clip the layer above, which is perfect for putting a photo inside text or a shape. Create one by holding Alt (Windows) or Option (macOS) and clicking the line between two layers, or with Layer > Create Clipping Mask.
Watch out: If your brush strokes show up as black paint on the image, you are painting on the image thumbnail. Click the mask thumbnail first.
Practice idea
Take two landscape photos, stack them, add a mask to the top one and paint a soft black gradient across the horizon. In five minutes you will have a dreamy double-exposure blend, and you will understand masks for good.