Skip to content

3G2 (.3g2)

.3g2 file signature | video/3gpp2

Safe

Magic Bytes

Offset 4
66 74 79 70 33 67 32 61

Sources: Apache Tika

All Known Signatures

3 signature variants are documented for .3g2 files across multiple sources.

Hex Signature Offset Sources
66 74 79 70 33 67 32 61 4 Apache Tika
66 74 79 70 33 67 32 62 4 Apache Tika
66 74 79 70 33 67 32 63 4 Apache Tika

Extension

.3g2

MIME Type

video/3gpp2

Byte Offset

4

Risk Level

Safe

Validation Code

How to validate .3g2 files in Python

Python
def is_3g2(file_path: str) -> bool:
    """Check if file is a valid 3G2 by magic bytes."""
    signature = bytes([0x66, 0x74, 0x79, 0x70, 0x33, 0x67, 0x32, 0x61])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .3g2 files in Node.js

Node.js
function is3G2(buffer: Buffer): boolean {
  const signature = Buffer.from([0x66, 0x74, 0x79, 0x70, 0x33, 0x67, 0x32, 0x61]);
  return buffer.subarray(0, 8).equals(signature);
}

How to validate .3g2 files in Go

Go
func Is3G2(data []byte) bool {
    signature := []byte{0x66, 0x74, 0x79, 0x70, 0x33, 0x67, 0x32, 0x61}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

GET /api/v1/3g2
curl https://filesignature.org/api/v1/3g2

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .3g2 file?

A .3g2 file is a 3G2 file.

What are the magic bytes for .3g2 files?

The magic bytes for 3G2 files are 66 74 79 70 33 67 32 61 at byte offset 4. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .3g2 file?

To validate a .3g2 file, read the first bytes of the file and compare them against the known magic bytes (66 74 79 70 33 67 32 61) at offset 4. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .3g2 files?

The primary MIME type for .3g2 files is video/3gpp2.

Is it safe to open .3g2 files?

3G2 (.3g2) 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.