You can add a mask to a layer and use the mask to hide portions of the layer and reveal the layers below. Masking layers is a valuable compositing technique for combining multiple photos into a single image or for making local color and tonal corrections.
From an expert: Using Adjustment layers with Masks
Expert Andy Anderson shows how to effectively use adjustment layers and mask techniques to achieve non-destructive edits in your Photoshop projects.
You can use masks to hide portions of a layer and reveal portions of the layers below. You can create two types of masks:
Layer masks are resolution-dependent bitmap images that are edited with the painting or selection tools.
Vector masks are resolution independent and are created with a pen or shape tool.
Layer and vector masks are nondestructive, which means you can go back and re‑edit the masks later without losing the pixels they hide.
In the Layers panel, both the layer and vector masks appear as an additional thumbnail to the right of the layer thumbnail. For the layer mask, this thumbnail represents the grayscale channel that is created when you add the layer mask. The vector mask thumbnail represents a path that clips out the contents of the layer.
Note:
To create a layer or vector mask on the Background layer, first convert it to a regular layer (Layer > New > Layer from Background).
Masking layer
A. Layer mask thumbnail B. Vector mask thumbnail C. Vector Mask Link icon D. Add Mask
You can edit a layer mask to add or subtract from the masked region. A layer mask is a grayscale image, so areas you paint in black are hidden, areas you paint in white are visible, and areas you paint in shades of gray appear in various levels of transparency.
Background painted with black; description card painted with gray; basket painted with white
A vector mask creates a sharp-edged shape on a layer and is useful anytime you want to add a design element with clean, defined edges. After you create a layer with a vector mask, you can apply one or more layer styles to it, edit them if needed, and instantly have a usable button, panel, or other web-design element.
The Properties panel (CS6) or the Masks panel (CS5) provide additional controls to adjust a mask. You can change the opacity of mask to let more or less of the masked content show through, invert the mask, or refine the mask borders, as with a selection area.
Masks panel (CS5) and Properties panel (CS6)
A. Select the filter mask. B. Add a pixel mask. C. Add a vector mask. D. Panel menu. E. Apply Mask F. Layer mask G. Vector mask
When you add a layer mask, you can hide or show all of the layer, or base the mask on a selection or transparency. Later, you’ll paint on the mask to precisely hide portions of the layer, revealing the layers beneath.
- To create a mask that reveals the entire layer, click the Add Layer Mask
button in the Layers panel, or choose Layer > Layer Mask > Reveal All.
- To create a mask that hides the entire layer, Alt-click (Windows) or Option-click (Mac OS) the Add Layer Mask button, or choose Layer > Layer Mask > Hide All.
In CS5, you can also use the Masks panel (Window > Masks).
- To create a mask that reveals the entire layer, click the Add Layer Mask
If you want to directly edit layer transparency, create a mask from this data. This technique is helpful for video and 3D workflows.
Photoshop converts transparency into an opaque color, hidden by the newly created mask. The opaque color varies greatly, depending upon the filters and other processing previously applied to the layer.
By default, a layer or group is linked
to its layer mask or vector mask, as indicated by the link icon
between
the thumbnails in the Layers panel. The layer and its mask
move together in the image when you move either one with the Move tool
. Unlinking
them lets you move them independently and shift the mask’s boundaries
separately from the layer.
To unlink a layer from its mask, click the link icon in the Layers panel.
To reestablish the link between a layer and its mask, click between the layer and mask path thumbnails in the Layers panel.
You can apply a layer mask to permanently delete the hidden portions of a layer. Layer masks are stored as alpha channels, so applying and deleting layer masks can help reduce file size. You can also delete a layer mask without applying the changes.
- To remove the layer mask after applying it permanently to the layer, click the Apply Mask icon
at the bottom of the Masks panel (CS6) or Properties panel (CS6).
- To remove the layer mask without applying it to the layer, click the Delete button at the bottom of the Masks panel, and then click Delete.
Note:
You cannot apply a layer mask permanently to a Smart Object layer when deleting the layer mask.
- To remove the layer mask after applying it permanently to the layer, click the Apply Mask icon
For easier editing of a layer mask, you can display the grayscale mask by itself or as a rubylith overlay on the layer.
Use the Properties panel (CS6) or the Masks panel(CS5) to adjust the opacity of a selected layer or vector mask. The Density slider controls mask opacity. Feather lets you soften mask edges.
Additional options are specific to layer masks. The Invert option reverses masked and unmasked areas. The Mask Edge option gives you various controls to modify the mask edges, such as Smooth and Contract/Expand. For information on the Color Range option, see Confine adjustment and fill layers to specific areas.
Click Mask Edge. You can modify mask edges with the options in the Refine Mask dialog box and view the mask against different backgrounds. For a description of options, see Refine selection edges.

