Skip to content

OpenEXR bitmap image format (.exr)

.exr file signature | image/aces

OpenEXR bitmap image format

Safe

Magic Bytes

Offset 0
76 2F 31 01

Sources: Wikipedia, Gary Kessler

All Known Signatures

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

Hex Signature Offset Sources
76 2F 31 01 0 Wikipedia, Gary Kessler
76 2F 31 01 02 00 00 00 0 Apache Tika
76 2F 31 01 02 04 00 00 0 Apache Tika

Extension

.exr

MIME Type

image/aces

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .exr files in Python

Python
def is_exr(file_path: str) -> bool:
    """Check if file is a valid EXR by magic bytes."""
    signature = bytes([0x76, 0x2F, 0x31, 0x01])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .exr files in Node.js

Node.js
function isEXR(buffer: Buffer): boolean {
  const signature = Buffer.from([0x76, 0x2F, 0x31, 0x01]);
  return buffer.subarray(0, 4).equals(signature);
}

How to validate .exr files in Go

Go
func IsEXR(data []byte) bool {
    signature := []byte{0x76, 0x2F, 0x31, 0x01}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .exr file?

A .exr file is a OpenEXR bitmap image format file. OpenEXR bitmap image format

What are the magic bytes for .exr files?

The magic bytes for OpenEXR bitmap image format files are 76 2F 31 01 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .exr file?

To validate a .exr file, read the first bytes of the file and compare them against the known magic bytes (76 2F 31 01) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .exr files?

The primary MIME type for .exr files is image/aces.

Is it safe to open .exr files?

OpenEXR bitmap image format (.exr) 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.