Why do Photoshop files start with 8BPS?
Categories:
Unveiling the '8BPS' Signature: Why Photoshop Files Start with It

Explore the historical and technical reasons behind the '8BPS' magic number found at the beginning of every Adobe Photoshop Document (PSD) file.
If you've ever delved into the raw bytes of a file, you might have noticed certain files begin with a distinct sequence of characters or bytes. These are often referred to as 'magic numbers' or 'file signatures,' and they serve as a quick identifier for the file type. Adobe Photoshop Document (PSD) files are no exception, famously starting with the hexadecimal sequence 38 42 50 53
, which translates to the ASCII characters '8BPS'. But why this specific sequence? This article will demystify the '8BPS' signature, exploring its origins and significance in the world of digital imaging.
The Role of File Signatures (Magic Numbers)
File signatures are crucial for operating systems and applications to correctly identify and process files. Without them, a system would have to rely solely on file extensions, which can be easily changed or misleading. A magic number provides a more robust way to determine a file's format, ensuring that the correct software attempts to open it. This is particularly important for complex file formats like PSD, which contain a wealth of data including layers, masks, effects, and more.
flowchart TD A[User Opens File] --> B{Check File Extension?} B -- Yes --> C{Extension Matches App?} B -- No --> D{Check Magic Number?} C -- Yes --> E[Open with App] C -- No --> D D -- Yes --> F{Magic Number Matches App?} F -- Yes --> E F -- No --> G[Error: Unknown File Type] E --> H[File Processed]
How operating systems identify file types using extensions and magic numbers.
Decoding '8BPS': A Historical Abbreviation
The '8BPS' signature is not a random sequence; it's an abbreviation that harks back to the early days of Photoshop. '8B' stands for '8-bit,' referring to the color depth that was common when Photoshop was first developed. While modern Photoshop supports much higher color depths (16-bit, 32-bit), the original signature has been maintained for backward compatibility and as a consistent identifier. 'PS' is, of course, an abbreviation for 'Photoshop.' Together, '8BPS' essentially means '8-bit Photoshop' file, a legacy identifier that has persisted through decades of software evolution.
38 42 50 53 00 01 00 00 00 00 00 00 00 00 00 00
^-- 8BPS --^
A typical hexdump showing the '8BPS' signature at the beginning of a PSD file.
The PSD File Structure and '8BPS' Placement
The '8BPS' signature is the very first component of the PSD file header. The PSD file format is well-documented and consists of several sections, each beginning with specific markers and containing different types of data. The file header section, where '8BPS' resides, provides fundamental information about the image, such as its dimensions, color mode, and number of color channels. This initial signature acts as a gatekeeper, ensuring that only applications capable of understanding the PSD format proceed to parse the rest of the file.
graph TD A[PSD File] --> B(File Header) B --> C{8BPS Signature} B --> D(Version Information) B --> E(Channels, Rows, Columns) A --> F(Color Mode Data Section) A --> G(Image Resources Section) A --> H(Layer and Mask Information Section) A --> I(Image Data Section)
Simplified structure of a PSD file, highlighting the '8BPS' signature's position.
In conclusion, the '8BPS' at the start of a Photoshop file is more than just a random sequence; it's a historical artifact and a critical identifier. It ensures file integrity, aids in proper application handling, and offers a glimpse into the foundational design principles of one of the most ubiquitous image editing software in the world. Understanding these low-level details can provide valuable insight into how digital files are structured and processed.