Skip to content

Digital Imaging and Communications in Medicine (.dcm)

.dcm file signature | application/dicom

Digital Imaging and Communications in Medicine (DICOM) is a medical imaging file format and communication standard developed and maintained by the DICOM Standards Committee, jointly supported by the National Electrical Manufacturers Association and the American College of Radiology. It is used to store, exchange, and manage radiology images and related data from modalities such as CT, MRI, ultrasound, and X-ray within healthcare systems and PACS. It remains widely used, and files may include sensitive patient information, so privacy controls are important.

Safe

Magic Bytes

Offset 128
44 49 43 4D

Sources: Wikipedia, Gary Kessler

All Known Signatures

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

Hex Signature Offset Sources
44 49 43 4D 128 Wikipedia, Gary Kessler
3C 48 50 53 20 76 65 72 73 69 6F 6E 3D 22 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 at offset 128."""
    signature = bytes([0x44, 0x49, 0x43, 0x4D])
    with open(file_path, "rb") as f:
        f.seek(128)
        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]);
  if (buffer.length < 132) return false;
  return buffer.subarray(128, 132).equals(signature);
}

How to validate .dcm files in Go

Go
func IsDCM(data []byte) bool {
    signature := []byte{0x44, 0x49, 0x43, 0x4D}
    if len(data) < 132 {
        return false
    }
    return bytes.Equal(data[128:132], 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) is a medical imaging file format and communication standard developed and maintained by the DICOM Standards Committee, jointly supported by the National Electrical Manufacturers Association and the American College of Radiology. It is used to store, exchange, and manage radiology images and related data from modalities such as CT, MRI, ultrasound, and X-ray within healthcare systems and PACS. It remains widely used, and files may include sensitive patient information, so privacy controls are important.

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.