PSB File Documentation
Summary
A PSB (Photoshop Large Document Format) file is a layered Photoshop image built for very large work: the same editable format as PSD but able to hold canvases up to 300,000 × 300,000 pixels and files up to 4 exabytes, far past PSD’s 30,000-pixel and 2 GB limits. Adobe added it in Photoshop 7.0 (2002). Its MIME type is image/vnd.adobe.photoshop. It opens in Photoshop, and free in Photopea or GIMP.
Technical details
| Feature | Value |
|---|---|
| Full name | Photoshop Large Document Format (“Photoshop Big”) |
| File extension | .psb |
| MIME type | image/vnd.adobe.photoshop |
| Format type | Layered raster image (large-document variant of PSD) |
| Developer | Adobe Inc. (Adobe Systems) |
| Introduced | 2002 (Photoshop 7.0) |
| Open standard | No — proprietary, documented format |
| Byte order | Big-endian |
| Magic number (hex) | 38 42 50 53 (ASCII 8BPS), same as PSD |
| Version field (offset 4) | 00 02 = PSB (PSD is 00 01) |
| Max dimensions | 300,000 × 300,000 pixels |
| Max file size | 4 EB (exabytes) |
| Colour depth | 1, 8, 16 or 32 bits per channel |
| Colour modes | Bitmap, Grayscale, Indexed, RGB, CMYK, Lab, Multichannel, Duotone |
| Stores | Layers, masks, adjustment layers, smart objects, paths, text, channels |
| Compression | Raw or PackBits (per-channel RLE); ZIP for some data |
| Related extensions | .psd, .tiff, .png, .jpg |
| Specification | adobe.com/devnet-apps/photoshop/fileformatashtml/ |
What is a PSB file?
PSB is Adobe Photoshop’s Large Document Format, informally “Photoshop Big”. Adobe added it in Photoshop 7.0 in 2002 to get past the hard limits of the native PSD format. A standard PSD caps out at 30,000 × 30,000 pixels and a 2 GB file size; PSB raises those ceilings to 300,000 × 300,000 pixels and a maximum file size of 4 exabytes. Apart from those larger limits, a PSB is the same layered raster document as a PSD, storing layers, masks, adjustment layers, channels, paths, smart objects and editable text.
People meet PSB files in high-resolution work: gigapixel panoramas, large-format print such as posters and billboards, game and 3D texture maps, and digital matte paintings. Photoshop writes a PSB when you explicitly choose Large Document Format (*.PSB) in Save As, and it also switches to PSB automatically the moment a document grows past PSD’s limits. The sections below describe how the format encodes all of that, and exactly where it diverges from PSD.
The file header: signature, version and dimensions
A PSB opens with a fixed-layout header, all values big-endian. The critical detail is that the signature is identical to PSD; the version field is what tells them apart.
Offset Size Field
0 4 Signature '8BPS' (38 42 50 53)
4 2 Version 2 for PSB (1 = PSD)
6 6 Reserved must be zero
12 2 Channels 1..56
14 4 Height 1..300000 (PSD: 1..30000)
18 4 Width 1..300000 (PSD: 1..30000)
22 2 Depth 1, 8, 16 or 32 bits per channel
24 2 Color mode 0 Bitmap, 1 Gray, 2 Indexed, 3 RGB,
4 CMYK, 7 Multichannel, 8 Duotone, 9 Lab
The Version value at offset 4 is the single field that marks a Large Document. A reader that sees 8BPS then 0x0002 knows to interpret the file with the PSB rules; 0x0001 means the classic PSD rules. This is why the two formats share a magic number yet are never confused by software that checks the version. The Height and Width fields are both stored as 32-bit integers in either format, but the valid range is what changes: PSB accepts values up to 300,000 in each dimension.
The four sections after the header
After the 26-byte header, a PSB is divided into the same four length-prefixed sections as a PSD, in this order:
| Section | Contents |
|---|---|
| Color Mode Data | Palette for Indexed/Duotone images; empty for RGB/CMYK |
| Image Resources | Guides, ICC profile, thumbnail, print flags, EXIF, metadata |
| Layer and Mask Information | Every layer, its mask, blending, effects and per-layer pixels |
| Image Data | The merged/composite image across all channels |
Each section begins with a length so a reader can skip a section it does not need. The Color Mode Data section is populated only for Indexed and Duotone modes. The Image Resources section is a series of resource blocks, each tagged with an 8BIM signature and a numeric ID identifying what it holds (for example the ICC profile, the embedded thumbnail, or the layout guides). The final Image Data section stores the flattened composite so that any program can display the picture without interpreting the layer stack.
Where PSB widens the fields: 8-byte lengths
The structural change that lets PSB hold enormous documents is that several length and count fields are widened from 32-bit to 64-bit. In PSD, the Layer and Mask Information section length and the per-channel image-data lengths are 4-byte values, which is part of what enforces the 2 GB ceiling. In PSB, those same fields are stored as 8-byte values. Concretely, the overall Layer and Mask Information length, the individual layer channel-data lengths, and the section lengths that would overflow 32 bits are all 64-bit in a PSB. Signatures inside the file also gain large-document variants: certain additional-layer-information blocks that use the 8BIM key in a PSD use the 8B64 key in a PSB to signal a 64-bit length.
Everything else in the layer records is unchanged. Each layer still carries its bounding rectangle, its channel count and channel info, a blend-mode key (such as norm, mul or scrn), an opacity byte, a clipping flag, and a mask. Adjustment layers, layer effects, type (text) data and smart objects are all stored in additional-layer-information blocks keyed by four-character codes, exactly as in PSD. In practice PSB is PSD with wider size fields, which is why the two are so structurally close and why Photoshop can move a document between them when it fits.
Channel data and PackBits compression
Pixel data in both the per-layer channels and the final Image Data section is stored channel by channel, not pixel-interleaved. Each channel starts with a 2-byte compression code:
0 = Raw uncompressed channel bytes
1 = PackBits per-scanline run-length encoding (RLE)
2 = ZIP without prediction
3 = ZIP with prediction
PackBits, code 1, is the common case. It is a simple byte-oriented run-length scheme: a control byte n in the range 0 to 127 means copy the next n+1 bytes literally, while n from −1 to −127 means repeat the next single byte 1−n times. When PackBits is used, the channel is preceded by a table of scanline byte-lengths, and in a PSB those scanline counts are stored as larger values to match the format’s bigger canvases. This per-channel, per-scanline layout is why editors can decode a Photoshop image progressively rather than loading the whole thing at once, though a gigapixel PSB is still heavy on memory.
Opening a PSB and flattening it out
The native editor is Adobe Photoshop, now subscription-only through Creative Cloud. Two free routes matter. Photopea, a browser-based editor, opens a PSB with its layers intact and needs no install. GIMP opens a PSB too, though some Photoshop-only features are flattened or dropped on import. Affinity Photo is a paid alternative that also reads large PSD and PSB files.
Because PSB is heavy and not widely supported outside Photoshop, the usual goal beyond editing is a portable copy. Saving down to a plain PSD works only if the document now fits PSD’s 30,000-pixel and 2 GB limits; a document that genuinely exceeds them must stay PSB. For sharing and viewing, flatten to TIFF (which can still retain layers and is the best choice for large, high-quality print), or to PNG or JPG for an ordinary single-layer image. Flattening permanently discards the editable layer stack, so keep the PSB as the master.
Frequently asked questions
What is the difference between PSB and PSD?
They are the same layered Photoshop format. PSB stores a version value of 2 (PSD stores 1) and widens key length fields to 64 bits, which lets it hold canvases up to 300,000 pixels and files up to 4 EB, versus PSD’s 30,000-pixel and 2 GB limits. Photoshop switches to PSB automatically when a document exceeds PSD’s limits.
How do I open a PSB without Photoshop?
Use Photopea (free, in the browser, opens PSB with layers) or GIMP (free desktop, though some Photoshop-only features may be flattened). Affinity Photo is a paid alternative that also opens large PSD and PSB files.
Why is my PSB so slow to open?
PSB files can be several gigabytes with gigapixel canvases, so they demand a lot of RAM and disk. On a low-spec machine they open slowly or fail. Try Photopea in a browser, close other applications, or ask the sender for a flattened TIFF or PNG instead.
References
- Adobe — Photoshop file format specification (PSD/PSB)
- Adobe — Photoshop file formats (Large Document Format)
- Photopea — free online PSD/PSB editor
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.