What a layer mask is, and how to use one

Updated on

A layer mask hides parts of a layer without erasing them. It's a black and white image attached to the layer: where the mask is white, the layer shows, and where it's black, the layer is hidden. Paint white and the hidden part comes back. PhotopixPro, a free editor in your browser, has masks with the Photoshop menu names.

What a layer mask is

Think of the mask as a stencil laid over the layer. White means "show", black means "hide", and gray, between the two, makes the layer partly see-through. Nothing is deleted: the pixels are still there under the black, which is why a mask is safer than the Eraser Tool. You can change your mind as often as you like.

In the Layers panel, a layer with a mask has two thumbnails: the layer's own, and the mask's, next to it. If the Layers panel is new to you, start with our beginner's guide to layers.

A layer mask decides, pixel by pixel, how much of its layer you see.

  1. Layer The photo you want to blend or cut out
  2. Layer mask White on the left shows the layer; black on the right hides it
  3. Result The photo fades into transparency where the mask turns black, and no pixel is erased

Add a layer mask

  1. In the Layers panel, select the layer you want to mask.
  2. Click Add a mask, the third button at the bottom of the panel, or choose Layer > Layer Mask > Reveal All. A white mask thumbnail appears next to the layer, and the picture looks the same as before.

To mask from a selection, make the selection first, for example with Select > Subject or the Rectangular Marquee Tool (M), then click Add a mask: what's selected stays visible and the rest is hidden. To start the other way around, Layer > Layer Mask > Hide All adds a black mask that hides the whole layer, and you paint back what you want in white. With a selection active, Layer > Layer Mask > Hide Selection hides only the selected area.

The Background layer of a photo can't have a mask, so Layer > Layer Mask is grayed out when it's the only layer. Click Add a mask anyway and the editor first turns the Background into a normal layer called Layer 0. You can also copy it with Layer > New > Layer via Copy (Ctrl+J) and mask the copy.

PSD open in PhotopixPro with a Title group, two text layers and an adjustment layer called Vignette that has a layer mask
The Layers panel with a mask on an adjustment layer (Vignette): the mask thumbnail sits next to the layer thumbnail.

Paint on the mask

  1. Choose the Brush Tool (B). Adding a mask sets the colors to white in front and black behind.
  2. Press X to swap them, so black is in front. Change the brush size with ] and [.
  3. Paint over what you want to hide. The layer disappears where you paint, and the stroke shows up in the mask's thumbnail. If there's nothing below, you see the checkerboard of transparency.
  4. Press X again to paint in white and bring back anything you hid by mistake.

Press D at any time to go back to white in front and black behind.

Check, invert, soften or turn off the mask

  • See the mask itself: Alt+click its thumbnail. The canvas shows the mask in black and white; Alt+click again to go back to the picture.
  • Turn it off for a moment: Shift+click the thumbnail. A red cross appears on it and the whole layer shows; Shift+click again to turn it back on. The menu equivalent is Layer > Layer Mask > Disable Layer Mask.
  • Invert it: with the mask selected, press Ctrl+I. What was hidden now shows, and the other way around; the layer's pixels don't change. Properties also has an Invert button.
  • Soften the edge: with the mask selected, raise Feather in the Properties panel. In our test, 10 px turned a hard edge into a soft fade about 54 px wide.
  • Let some of the hidden part show: lower Density in the same panel. At 50%, what the mask hides shows at half strength. Neither setting changes the mask itself: set Feather back to 0 px and Density to 100% and it's exactly as it was.

Apply or delete the mask

  • Layer > Layer Mask > Apply makes the mask permanent: it disappears, and the hidden parts of the layer become transparent pixels. Edit > Undo (Ctrl+Z) brings the mask back if you change your mind straight away. To save the cut-out on its own, with a transparent background, use Layer > Quick Export as PNG, as our PSD to PNG page explains.
  • Layer > Layer Mask > Delete removes the mask and shows the whole layer again. It doesn't ask for confirmation.

Right-click the mask's thumbnail for the same commands: Disable Layer Mask, Delete Layer Mask and Apply Layer Mask.

Masks on adjustment layers

Every adjustment layer comes with its own mask, so you can brighten or darken just part of a photo:

  1. Choose Layer > New Adjustment Layer > Curves… A layer called Curves 1 appears, with a white mask.
  2. In the Properties panel, drag the middle of the curve down. The whole photo gets darker.
  3. Click the white mask thumbnail of Curves 1. Properties now shows Layer Mask.
  4. With the Brush Tool and black in front, paint over the part that should stay as it was. The adjustment stops working there.

In our test, the area we painted went back to the brightness of the original photo, while the rest stayed darker. To change the curve again, click the adjustment's own thumbnail, not the mask's. Our Curves and Levels guide covers the adjustments themselves.

Clipping masks

A clipping mask works differently: it shows a layer only where the layer below it has pixels. Put a photo above a text layer and clip it, and the photo shows only inside the letters. The layer below acts as the mask, so you change the shape by editing that layer.

To make one, put the layer you want to clip directly above the base layer, select it and choose Layer > Create Clipping Mask (Ctrl+Alt+G), which is also in a layer's right-click menu. In the Layers panel, the clipped layer moves slightly to the right, with a small arrow beside it. Clipping masks in PSD files open as they were made.

Layer mask vs clipping mask

Compared itemLayer maskClipping mask
What decides what showsThe mask's own black and whiteThe shape of the layer below
Where it livesOn the layer, as a second thumbnailIn the layer below, which acts as the shape
Good forHiding, fading or blending part of one layerA photo inside text or a shape
How to add itAdd a mask, or Layer > Layer Mask > Reveal AllLayer > Create Clipping Mask

A layer can have both: a layer mask of its own, and a clipping relationship with the layer below.

How we checked this guide

We tested the layer mask steps on October 17, 2026, in Chromium, on a photo: adding a mask, painting in black and white, Shift+click, Alt+click, inverting, applying, deleting and undoing. We also limited a Curves adjustment layer with its mask and measured the result, made a clipping mask with Layer > Create Clipping Mask, and opened PSD files that already had clipping masks. We also made masks from a selection (Select > Subject and a rectangle), with Hide All and with Hide Selection, and measured Feather and Density in the exported image. We didn't test Alt+click on Add a mask, which makes an inverted mask.

Frequently asked questions

What is a layer mask?

A layer mask is a black and white image attached to a layer that controls which parts of it show. White shows the layer, black hides it, and gray makes it partly transparent. Because nothing is erased, you can bring hidden parts back at any time by painting white, which makes masks the safe way to cut out, blend or fade a layer.

What is the difference between a layer mask and a clipping mask?

A layer mask belongs to one layer and uses its own black and white to hide or show parts of it. A clipping mask uses the layer below as the shape: the clipped layer only shows where that base layer has pixels. Use a layer mask to blend or cut out, and a clipping mask to fill text or a shape with a photo.

Does black or white hide on a layer mask?

Black hides and white shows. Remember it as "white reveals, black conceals". Gray hides partly: the darker the gray, the more see-through the layer becomes. In PhotopixPro, adding a mask sets the colors to white and black; press X to swap them while you paint, and D to reset them.

How do I add a layer mask?

Select the layer and click Add a mask, the third button at the bottom of the Layers panel, or choose Layer > Layer Mask > Reveal All. The mask starts white, so nothing changes until you paint black on it. With an active selection, the button keeps the selected area visible. On a photo's Background layer, the button first turns it into a normal layer.

Why is my layer mask not working?

Usually you're painting on the layer instead of the mask: click the mask's thumbnail before you paint. Check that the brush color is black or white, not a color, and that the mask isn't turned off, which shows as a red cross on its thumbnail; Shift+click to turn it on. If the Layer Mask menu is grayed out, the layer is a Background: convert it first.

Can I use layer masks online for free?

Yes. PhotopixPro runs in your browser and is free, with no account and no ads. It has layer masks with the same menu names as Photoshop, and masks inside PSD files open with the file. Save your work as a PSD with File > Save to keep the masks editable. Your files aren't uploaded: everything happens inside the tab.

What are the layer mask shortcuts?

The ones we tested: B for the Brush Tool, X to swap black and white, D to reset them, ] and [ to change the brush size, Shift+click on the mask thumbnail to turn it off, Alt+click to see it, and Ctrl+I to invert it while it's selected. On a Mac, use Cmd for Ctrl and Option for Alt, though we haven't tested them there yet.

Try a layer mask

Open the editor, drop in a photo and add a mask. Nothing is uploaded.