Skip to content

SevenZip (.sevenzip)

.sevenzip file signature | application/x-7z-compressed

Safe

Magic Bytes

Offset 0
37 7A BC AF 27 1C

Sources: Neil Harvey FileSignatures

Extension

.sevenzip

MIME Type

application/x-7z-compressed

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .sevenzip files in Python

Python
def is_sevenzip(file_path: str) -> bool:
    """Check if file is a valid SEVENZIP by magic bytes."""
    signature = bytes([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])
    with open(file_path, "rb") as f:
        return f.read(6) == signature

How to validate .sevenzip files in Node.js

Node.js
function isSEVENZIP(buffer: Buffer): boolean {
  const signature = Buffer.from([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C]);
  return buffer.subarray(0, 6).equals(signature);
}

How to validate .sevenzip files in Go

Go
func IsSEVENZIP(data []byte) bool {
    signature := []byte{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C}
    if len(data) < 6 {
        return false
    }
    return bytes.Equal(data[:6], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .sevenzip file?

A .sevenzip file is a SevenZip file.

What are the magic bytes for .sevenzip files?

The magic bytes for SevenZip files are 37 7A BC AF 27 1C at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .sevenzip file?

To validate a .sevenzip file, read the first bytes of the file and compare them against the known magic bytes (37 7A BC AF 27 1C) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .sevenzip files?

The primary MIME type for .sevenzip files is application/x-7z-compressed.

Is it safe to open .sevenzip files?

SevenZip (.sevenzip) 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.