Skip to content

Photoshop image file (.psd)

.psd file signature | image/vnd.adobe.photoshop

Photoshop Document (PSD) is Adobe’s native raster image format, developed and maintained by Adobe Systems for Adobe Photoshop. It is used for layered image editing, compositing, and exchange of graphics assets in design and photography workflows. PSD files can preserve layers, masks, and metadata, and older versions are supported by many editors, though untrusted files should still be opened with standard caution due to embedded content.

Safe

Magic Bytes

Offset 0
38 42 50 53

Sources: Wikipedia, Gary Kessler, Neil Harvey FileSignatures

All Known Signatures

3 signature variants are documented for .psd files across multiple sources.

Hex Signature Offset Sources
38 42 50 53 0 Wikipedia, Gary Kessler, Neil Harvey FileSignatures
38 42 50 53 00 01 0 Apache Tika
38 42 50 53 00 02 0 Apache Tika

Extension

.psd

MIME Type

image/vnd.adobe.photoshop

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .psd files in Python

Python
def is_psd(file_path: str) -> bool:
    """Check if file is a valid PSD by magic bytes."""
    signature = bytes([0x38, 0x42, 0x50, 0x53])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .psd files in Node.js

Node.js
function isPSD(buffer: Buffer): boolean {
  const signature = Buffer.from([0x38, 0x42, 0x50, 0x53]);
  return buffer.subarray(0, 4).equals(signature);
}

How to validate .psd files in Go

Go
func IsPSD(data []byte) bool {
    signature := []byte{0x38, 0x42, 0x50, 0x53}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/psd
curl https://filesignature.org/api/v1/psd

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .psd file?

A .psd file is a Photoshop image file file. Photoshop Document (PSD) is Adobe’s native raster image format, developed and maintained by Adobe Systems for Adobe Photoshop. It is used for layered image editing, compositing, and exchange of graphics assets in design and photography workflows. PSD files can preserve layers, masks, and metadata, and older versions are supported by many editors, though untrusted files should still be opened with standard caution due to embedded content.

What are the magic bytes for .psd files?

The magic bytes for Photoshop image file files are 38 42 50 53 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .psd file?

To validate a .psd file, read the first bytes of the file and compare them against the known magic bytes (38 42 50 53) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .psd files?

The primary MIME type for .psd files is image/vnd.adobe.photoshop.

Is it safe to open .psd files?

Photoshop image file (.psd) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.