DB2 conversion file (.cnv)
.cnv file signature | application/octet-stream
A DB2 conversion file (CNV) is a data interchange file format associated with IBM Db2 and maintained as part of its database tooling ecosystem. It is used for moving or transforming table data between systems, imports, exports, and related database migration workflows. The format is generally considered safe, though as with any data file, content should be validated before processing; it is primarily encountered in legacy DB2 environments.
Magic Bytes
Offset 0
53 51 4C 4F 43 4F 4E 56 48 44 00 00 31 2E 30 00
Sources: Gary Kessler
Extension
.cnv
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .cnv files in Python
def is_cnv(file_path: str) -> bool:
"""Check if file is a valid CNV by magic bytes."""
signature = bytes([0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .cnv files in Node.js
function isCNV(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00]);
return buffer.subarray(0, 16).equals(signature);
}
How to validate .cnv files in Go
func IsCNV(data []byte) bool {
signature := []byte{0x53, 0x51, 0x4C, 0x4F, 0x43, 0x4F, 0x4E, 0x56, 0x48, 0x44, 0x00, 0x00, 0x31, 0x2E, 0x30, 0x00}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
/api/v1/cnv
curl https://filesignature.org/api/v1/cnv
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .cnv file?
A .cnv file is a DB2 conversion file file. A DB2 conversion file (CNV) is a data interchange file format associated with IBM Db2 and maintained as part of its database tooling ecosystem. It is used for moving or transforming table data between systems, imports, exports, and related database migration workflows. The format is generally considered safe, though as with any data file, content should be validated before processing; it is primarily encountered in legacy DB2 environments.
What are the magic bytes for .cnv files?
The magic bytes for DB2 conversion file files are 53 51 4C 4F 43 4F 4E 56 48 44 00 00 31 2E 30 00 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .cnv file?
To validate a .cnv file, read the first bytes of the file and compare them against the known magic bytes (53 51 4C 4F 43 4F 4E 56 48 44 00 00 31 2E 30 00) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .cnv files?
There is no officially registered MIME type for .cnv files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .cnv files?
DB2 conversion file (.cnv) 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.