Skip to content

Digital Imaging and Communications in Medicine (.dcm)

.dcm file signature | application/dicom

Digital Imaging and Communications in Medicine (DICOM) fileSeeDICOM PS 3.10 2011 - Media Storage and File Format for Media InterchangespecificationTrailer:FE FF D0 E0 00 00 00 00(})

Safe

Magic Bytes

Offset 128
44 49 43 4D

Sources: Wikipedia

All Known Signatures

5 signature variants are documented for .dcm files across multiple sources.

Hex Signature Offset Sources
44 49 43 4D 128 Wikipedia
3C 48 50 53 20 76 65 72 73 69 6F 6E 3D 22 0 Gary Kessler
12 80 BE FF E4 49 43 4D 0 Gary Kessler
45 45 53 63 68 65 6D 61 2D 44 4F 43 4C 49 42 20 0 Gary Kessler
44 49 43 4D 0 Neil Harvey FileSignatures

Extension

.dcm

MIME Type

application/dicom

Byte Offset

128

Risk Level

Safe

Validation Code

How to validate .dcm files in Python

Python
def is_dcm(file_path: str) -> bool:
    """Check if file is a valid DCM by magic bytes."""
    signature = bytes([0x44, 0x49, 0x43, 0x4D])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .dcm files in Node.js

Node.js
function isDCM(buffer: Buffer): boolean {
  const signature = Buffer.from([0x44, 0x49, 0x43, 0x4D]);
  return buffer.subarray(0, 4).equals(signature);
}

How to validate .dcm files in Go

Go
func IsDCM(data []byte) bool {
    signature := []byte{0x44, 0x49, 0x43, 0x4D}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .dcm file?

A .dcm file is a Digital Imaging and Communications in Medicine file. Digital Imaging and Communications in Medicine (DICOM) fileSeeDICOM PS 3.10 2011 - Media Storage and File Format for Media InterchangespecificationTrailer:FE FF D0 E0 00 00 00 00(})

What are the magic bytes for .dcm files?

The magic bytes for Digital Imaging and Communications in Medicine files are 44 49 43 4D at byte offset 128. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .dcm file?

To validate a .dcm file, read the first bytes of the file and compare them against the known magic bytes (44 49 43 4D) at offset 128. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .dcm files?

The primary MIME type for .dcm files is application/dicom.

Is it safe to open .dcm files?

Digital Imaging and Communications in Medicine (.dcm) 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.