Photoshop image file (.psd)
.psd file signature | image/vnd.adobe.photoshop
Photoshop Document file,Adobe Photoshop's native file format
Magic Bytes
Offset 0
38 42 50 53
Sources: Wikipedia, Gary Kessler, Neil Harvey FileSignatures
All Known Signatures
6 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 |
| 34 CD B2 A1 | 0 | Gary Kessler |
| 37 7A BC AF 27 1C | 0 | Gary Kessler |
| 37 E4 53 96 C9 DB D6 07 | 0 | Gary Kessler |
Extension
.psd
MIME Type
image/vnd.adobe.photoshop
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .psd files in 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
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
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
/api/v1/psd
curl https://filesignature.org/api/v1/psd
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .psd file?
A .psd file is a Photoshop image file file. Photoshop Document file,Adobe Photoshop's native file format
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.