How to Mask in Photoshop to Hide Layers
In this article
Layer masks in Photoshop let you hide parts of a layer without permanently deleting pixels. You paint with black to conceal and white to reveal, which makes it easy to blend images, remove backgrounds, or apply adjustments to specific areas. This guide covers the essential steps for creating and editing masks, plus common pitfalls and fixes.
What You'll Need
- Adobe Photoshop (any recent version, including CC or CS6)
- An image or document with at least one layer
- A basic understanding of layers and the Layers panel
Step-by-Step
- Open your project in Photoshop. If you're working with multiple images, place them on separate layers using File > Place Embedded or by dragging them onto the canvas.
- Select the layer you want to mask in the Layers panel. Click once on the layer name so it's highlighted.
- Add a layer mask by clicking the Add layer mask icon at the bottom of the Layers panel (a rectangle with a circle inside). A white thumbnail appears next to the layer thumbnail. This is the mask — white means the layer is fully visible.
- Choose the Brush tool from the toolbar (shortcut: B). Set the foreground color to black. You can do this by pressing D to reset colors to default (black/white), then X to swap so black is on top.
- Paint over the areas you want to hide. As you paint with black, those parts of the layer become transparent, revealing layers below. If you make a mistake, switch the foreground color to white and paint back over the area to restore it.
- Adjust brush settings as needed. Use a soft-edged brush for smooth transitions, and adjust opacity or flow in the options bar to control how strongly the mask applies. Lower opacity creates partial transparency.
- Refine the mask edges by using the Select and Mask workspace. With the mask thumbnail selected, go to Select > Select and Mask (or click the button in the options bar when a selection tool is active). Use the edge detection sliders to clean up hair or fuzzy edges.
- Use a gradient for smooth transitions. Select the Gradient tool, choose a black-to-white gradient, and drag across the mask. This creates a gradual fade from visible to hidden — great for blending images.
- View the mask by Alt-clicking (Windows) or Option-clicking (Mac) the mask thumbnail. This shows the mask as a grayscale image in the canvas, so you can see exactly what you're painting. Click again to return to normal view.
- Disable or enable the mask temporarily by Shift-clicking the mask thumbnail. A red X appears, and the mask is ignored. This is useful for comparing before and after.
- Apply or discard the mask when done. Right-click the mask thumbnail and choose Apply Layer Mask to permanently delete hidden pixels, or Delete Layer Mask to remove the mask and keep the layer intact.
Common Mistakes
- Painting on the layer, not the mask — Make sure the mask thumbnail is selected (it will have a white border). If you paint on the layer itself, you'll draw black lines instead of hiding pixels.
- Using black and white incorrectly — Black hides, white reveals. Many beginners get this reversed.
- Hard brush edges — A hard brush creates abrupt, visible transitions. Use a soft brush for natural blending.
- Forgetting to reset brush opacity — If your brush opacity is low, you'll only partially hide pixels, which may look like a faint ghost.
- Deleting the mask instead of applying it — Deleting the mask removes the hiding effect entirely; applying it permanently removes the hidden pixels. Know the difference.
Tips
- Use keyboard shortcuts — Press B for Brush, D to reset colors, X to swap foreground/background, and [ / ] to resize the brush.
- Refine edge with color decontamination — In Select and Mask, enable Decontaminate Colors to remove color fringes around edges.
- Use masks on adjustment layers — Masks work on adjustment layers too, letting you apply a color or exposure change only to specific parts of the image.
- Copy masks between layers — Hold Alt (Windows) / Option (Mac) and drag the mask thumbnail to another layer to copy it.
- Invert a mask — Select the mask and press Ctrl+I (Windows) / Cmd+I (Mac) to invert it. This turns a white mask into black, hiding the entire layer, then you can paint white to reveal.
- Use quick mask mode for selection — Press Q to enter Quick Mask mode, paint with a brush, then press Q again to convert the painted area into a selection. Then add a layer mask from that selection.
Troubleshooting
- Mask isn't doing anything — Check that the mask is selected (white border) and that you're painting with black. Also verify the layer opacity is not set to 0%.
- Can't see the mask thumbnail — If the Layers panel is too narrow, drag the bottom edge of the panel to expand it. Or click the panel menu and choose Panel Options to adjust thumbnail size.
- Brush is painting gray instead of black — Your foreground color may be a dark gray. Press D to reset to pure black and white, then X if needed.
- Edges are too harsh — Use a soft brush, or after painting, apply a Gaussian Blur filter to the mask (select the mask, then Filter > Blur > Gaussian Blur).
- Mask disappears after applying — That's normal; applying a mask permanently deletes the hidden pixels. Use Edit > Undo (Ctrl+Z / Cmd+Z) immediately if you didn't mean to.
- Can't paint on mask because it's locked — Check if the layer has a lock icon. Unlock the layer by clicking the lock icon in the Layers panel.
Frequently Asked Questions
What is the difference between a layer mask and the eraser tool?
A layer mask is non-destructive: you can always paint white to bring back hidden pixels. The eraser tool permanently deletes pixels. Masks are generally preferred because they preserve the original image data.
How do I apply a mask to only part of a layer?
Make a selection with any selection tool (like the Lasso or Magic Wand), then click the Add Layer Mask button. The mask will automatically be filled with black outside the selection, hiding everything except the selected area.
Can I use a mask on a group of layers?
Yes. Select the group in the Layers panel and click the Add Layer Mask button. The mask will affect all layers inside the group as if they were one merged layer.
How do I save a mask for later use?
You can copy the mask to another layer by Alt-dragging it, or save it as a channel. Go to the Channels panel, select the mask channel, and choose Select > Save Selection to store it as an alpha channel.
Why is my mask painting with gray instead of black?
Your foreground color may be gray, or the brush opacity/flow is less than 100%. Set opacity and flow to 100% and ensure the color is pure black (#000000).
Can I use a layer mask on a text layer?
Yes, but you need to rasterize the text first (right-click the text layer and choose Rasterize Type). After that, you can add a mask and hide parts of the text.