Definition
A layer mask is a computer graphics technique that hides or reveals specific parts of an image without altering the original file. Instead of permanently erasing pixels, you apply a grayscale shield that controls which areas remain visible.
Covering with Paper Instead of Using an Eraser
You might remember using stencils in art class or sticking masking tape over edges before painting. A layer mask works on the exact same principle.
When people want to cut out a person from a photo background, their first instinct is often to reach for the eraser tool. But erasing pixels is risky. If you make a mistake, saving and closing the file means those erased pixels are gone forever.
A layer mask solves this by acting like a protective sheet laid directly over your photo. Without altering a single pixel of the original image, you simply mark which parts to show and which to hide. As long as you save your work in a layer-preserving format like PSD, you can bring hidden areas back at any time.
Black Conceals, White Reveals
Layer masks follow one simple, universal rule based purely on brightness: 'Black conceals, white reveals.' Once you understand this rule, you have unlocked the entire tool.
On a mask, anything painted black becomes hidden and transparent. White areas, on the other hand, let the original image shine through completely, like a clean cutout. What happens if you paint with a 50% gray? The image turns semitransparent, which is ideal for smoothly blending two photos together.
Painting with black feels just like erasing, but if you change your brush color to white and paint over it again, the hidden photo reappears like magic. It gives you the freedom to tweak and experiment without fear of ruining anything.
A Closer Look: Why Pros Never Use the Eraser Tool
To be precise, layer masks are the cornerstone of nondestructive editing in computer graphics. In digital design, lost pixel data cannot easily be recovered, making original file preservation critical.
Technically, a mask is a grayscale channel that stores visibility values for every pixel. In an 8-bit image, values range from 0 (black, fully transparent) to 255 (white, fully opaque), with intermediate shades creating partial transparency. This operates similarly to an alpha channel. The software reads these values to calculate each pixel's opacity in real time.
While an eraser destroys the underlying pixel data, a layer mask merely controls its display opacity without touching the source pixels. This adjustment shapes your final output, and saving in a layer-friendly format like PSD ensures you can edit it anytime. Exporting to a flattened format like JPG or PNG will bake the mask into the image permanently. In professional fields like advertising and visual effects, where designs constantly evolve, layer masks are the industry standard for this exact reason.
Common misconceptions
Hiding a background with a layer mask is just like deleting it, so it reduces the file size.
A mask hides content without deleting anything. Because all original pixels remain intact alongside the extra mask data, the file size actually does not shrink.
Where you meet it
Masking out a portrait's background to cleanly composite the subject into a new landscape.
Blending two photos seamlessly by painting a soft gray gradient across their seam.
In one sentence
A layer mask is a nondestructive editing tool that uses black, white, and gray values to hide or reveal parts of an image without altering the original pixels.