Layers, Masks and Smart Objects: How a PSD File Works
You open a PSD and the panel on the right is stacked with dozens of layers and cryptic icons. What's a mask, how does a smart object differ from an ordinary layer, and why doesn't an adjustment layer ruin the photo? Let's look under the hood of the Photoshop format and take apart, piece by piece, what a PSD file is really made of — no formulas, just plain English.
Layers — the foundation of everything
Strip away everything else, and a PSD is a stack of layers. Picture a set of transparent sheets laid one on top of another: the background on the bottom, an object above it, text higher up, a logo on top. Look down through them and you see one whole picture, yet every "sheet" stays separate.
This simple idea is the source of Photoshop's entire power. Any layer can be moved, hidden, made semi-transparent, swapped with its neighbour or deleted — and the rest are unharmed. The PSD format exists precisely for this freedom: it carefully stores every layer on its own.
The key idea
The final picture in a PSD isn't a "painted" image — it's the result of stacking layers top to bottom. Change a layer's order or opacity and the picture instantly changes, with no repainting.
The kinds of layers
Layers in a PSD come in several types — each with its own role:
- Raster layer — ordinary pixels: a photo, a fill, a texture, a brush stroke.
- Text layer — a caption that stays "live": you can rewrite the text and change the font and size at any time.
- Adjustment layer — a brightness, contrast, curves or color setting that affects everything below it without touching the pixels themselves.
- Shape layer — a vector form (rectangle, circle, custom path) that scales with no loss of sharpness.
- Group — a folder that holds related layers, to keep things tidy and manage them together.
Masks: hide, don't erase
The mask is probably the most underrated tool. To remove something unwanted, a beginner grabs the eraser and wipes out pixels. The trouble is, what's erased is gone for good: change your mind and you'll have to roll back the history or start over.
A mask solves this elegantly. It doesn't delete pixels, it merely hides them. Technically it's a black-and-white image on top of the layer: black hides, white reveals, grey makes things semi-transparent. Want the hidden parts back? Paint the mask white and everything returns. That's "non-destructive editing" — edits you can always undo.
Smart objects: containers with memory
An ordinary raster layer "forgets" the original: shrink an image, then enlarge it, and it goes blurry, because the discarded pixels can't be recovered. A smart object works differently. It's a container layer that stores the source in full inside.
What that gives you in practice:
- Lossless scaling. Shrink and enlarge as much as you like — sharpness holds, because Photoshop always pulls quality from the hidden original.
- Linked copies. Make several copies of a smart object, edit the contents of one, and they all update. Indispensable for templates and mockups.
- Safe filters. Effects on a smart object are applied "on top" and can be switched off at any time without harming the source.
Channels and transparency
Under the hood, color in a PSD is split into channels. In RGB mode there are three — red, green, blue; each stores how brightly its color shines in every pixel. Add the three together and you get a full-color picture. In CMYK mode there are four channels (for print), and in Grayscale just one.
Separately there's the alpha channel — it handles transparency. It's thanks to the alpha channel that a PSD (and later a PNG) can store a transparent background: the alpha channel says which pixels are visible and which are "see-through."
What's really inside the file
Described as a file, a PSD's structure is logical and predictable:
- Header. The basics: canvas dimensions, color mode, bit depth, channel count.
- Color and resource data. Color profiles, guides, metadata.
- Layer and mask section. The heart of the file: all the layers, their pixels, masks, effects and stacking order.
- Flattened image. At the very end, a "flat" picture of the whole document. Programs use it to show a quick preview without parsing the entire file layer by layer.
It's precisely because of the layer section and the flattened preview that a PSD weighs so much. There's more on sizes and the format's history in our article on what PSD is.
Why a regular person should know this
You might think a PSD's internals are a designer's concern only. But understanding the structure saves headaches for anyone who has ever held such a file:
- You'll understand why a PSD won't open in a browser. A browser can't assemble a picture from layers — it needs a finished PNG or JPG.
- You won't lose your edits. Knowing that all the editability lives only in the source, you'll keep the PSD, not just the flattened picture.
- You won't wreck the quality. You'll see why converting to JPG flattens layers and why that's a one-way street.
Need a finished picture from a PSD?
The free FormatZ converter carefully flattens all the layers, masks and effects into a clean PNG — right in your browser, with no Photoshop and no install.
Convert PSD to PNGWant to first understand how PSD differs from finished formats? See PSD vs PNG and JPG. And if you don't have Photoshop handy, learn how to open a PSD without it. The full list of conversions is on the all formats page.
Frequently asked questions
Read next
BasicsWhat Is PSD? The Layered Photoshop Format
Why a PSD is a project, not a picture, and what's inside it.
ComparisonPSD vs PNG and JPG: Source File vs Final Image
When to use which format, and why you must never confuse them.
GuideHow to Convert PSD to PNG, JPG or PDF the Right Way
Pick the right format for the job and keep your quality.