Skip to content

Canon digital camera RAW file (.crw)

.crw file signature | image/x-raw-canon

Canon digital camera RAW file

Safe

Magic Bytes

Offset 0
49 49 1A 00 00 00 48 45 41 50 43 43 44 52

Sources: Apache Tika

All Known Signatures

2 signature variants are documented for .crw files across multiple sources.

Hex Signature Offset Sources
49 49 1A 00 00 00 48 45 41 50 43 43 44 52 0 Apache Tika
49 49 1A 00 00 00 48 45 41 50 43 43 44 52 02 00 0 Gary Kessler

Extension

.crw

MIME Type

image/x-raw-canon

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .crw files in Python

Python
def is_crw(file_path: str) -> bool:
    """Check if file is a valid CRW by magic bytes."""
    signature = bytes([0x49, 0x49, 0x1A, 0x00, 0x00, 0x00, 0x48, 0x45, 0x41, 0x50, 0x43, 0x43, 0x44, 0x52])
    with open(file_path, "rb") as f:
        return f.read(14) == signature

How to validate .crw files in Node.js

Node.js
function isCRW(buffer: Buffer): boolean {
  const signature = Buffer.from([0x49, 0x49, 0x1A, 0x00, 0x00, 0x00, 0x48, 0x45, 0x41, 0x50, 0x43, 0x43, 0x44, 0x52]);
  return buffer.subarray(0, 14).equals(signature);
}

How to validate .crw files in Go

Go
func IsCRW(data []byte) bool {
    signature := []byte{0x49, 0x49, 0x1A, 0x00, 0x00, 0x00, 0x48, 0x45, 0x41, 0x50, 0x43, 0x43, 0x44, 0x52}
    if len(data) < 14 {
        return false
    }
    return bytes.Equal(data[:14], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .crw file?

A .crw file is a Canon digital camera RAW file file. Canon digital camera RAW file

What are the magic bytes for .crw files?

The magic bytes for Canon digital camera RAW file files are 49 49 1A 00 00 00 48 45 41 50 43 43 44 52 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .crw file?

To validate a .crw file, read the first bytes of the file and compare them against the known magic bytes (49 49 1A 00 00 00 48 45 41 50 43 43 44 52) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .crw files?

The primary MIME type for .crw files is image/x-raw-canon.

Is it safe to open .crw files?

Canon digital camera RAW file (.crw) 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.