Skip to content

T64 (.t64)

.t64 file signature | application/octet-stream

Commodore 64tape image

Safe

Magic Bytes

Offset 0
43 36 34 20 74 61 70 65 20 69 6D 61 67 65 20 66 69 6C 65

Sources: Wikipedia

Extension

.t64

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .t64 files in Python

Python
def is_t64(file_path: str) -> bool:
    """Check if file is a valid T64 by magic bytes."""
    signature = bytes([0x43, 0x36, 0x34, 0x20, 0x74, 0x61, 0x70, 0x65, 0x20, 0x69, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x6C, 0x65])
    with open(file_path, "rb") as f:
        return f.read(19) == signature

How to validate .t64 files in Node.js

Node.js
function isT64(buffer: Buffer): boolean {
  const signature = Buffer.from([0x43, 0x36, 0x34, 0x20, 0x74, 0x61, 0x70, 0x65, 0x20, 0x69, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x6C, 0x65]);
  return buffer.subarray(0, 19).equals(signature);
}

How to validate .t64 files in Go

Go
func IsT64(data []byte) bool {
    signature := []byte{0x43, 0x36, 0x34, 0x20, 0x74, 0x61, 0x70, 0x65, 0x20, 0x69, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x6C, 0x65}
    if len(data) < 19 {
        return false
    }
    return bytes.Equal(data[:19], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .t64 file?

A .t64 file is a T64 file. Commodore 64tape image

What are the magic bytes for .t64 files?

The magic bytes for T64 files are 43 36 34 20 74 61 70 65 20 69 6D 61 67 65 20 66 69 6C 65 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .t64 file?

To validate a .t64 file, read the first bytes of the file and compare them against the known magic bytes (43 36 34 20 74 61 70 65 20 69 6D 61 67 65 20 66 69 6C 65) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .t64 files?

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

Is it safe to open .t64 files?

T64 (.t64) 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.