Skip to content

QCOW (.qcow)

.qcow file signature | application/octet-stream

QCOW (QEMU Copy On Write) is a disk image file format created by Fabrice Bellard and maintained by the QEMU project for virtual machine storage. It is used to store guest operating system disks, support snapshots, and enable sparse allocation in virtualization environments and emulators. QCOW files are generally safe, but like other disk images, they should be obtained from trusted sources because they may contain malicious or unexpected data.

Safe

Magic Bytes

Offset 0
51 46 49

Sources: Wikipedia

Extension

.qcow

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .qcow files in Python

Python
def is_qcow(file_path: str) -> bool:
    """Check if file is a valid QCOW by magic bytes."""
    signature = bytes([0x51, 0x46, 0x49])
    with open(file_path, "rb") as f:
        return f.read(3) == signature

How to validate .qcow files in Node.js

Node.js
function isQCOW(buffer: Buffer): boolean {
  const signature = Buffer.from([0x51, 0x46, 0x49]);
  return buffer.subarray(0, 3).equals(signature);
}

How to validate .qcow files in Go

Go
func IsQCOW(data []byte) bool {
    signature := []byte{0x51, 0x46, 0x49}
    if len(data) < 3 {
        return false
    }
    return bytes.Equal(data[:3], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .qcow file?

A .qcow file is identified by the magic bytes 51 46 49 at byte offset 0. QCOW (QEMU Copy On Write) is a disk image file format created by Fabrice Bellard and maintained by the QEMU project for virtual machine storage. It is used to store guest operating system disks, support snapshots, and enable sparse allocation in virtualization environments and emulators. QCOW files are generally safe, but like other disk images, they should be obtained from trusted sources because they may contain malicious or unexpected data.

What are the magic bytes for .qcow files?

The magic bytes for QCOW files are 51 46 49 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .qcow file?

To validate a .qcow file, read the first bytes of the file and compare them against the known magic bytes (51 46 49) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .qcow files?

There is no officially registered MIME type for .qcow files. Systems typically use application/octet-stream as a generic fallback when handling this format.

Is it safe to open .qcow files?

QCOW (.qcow) 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.