YouTube Timed Text (.ytt)
.ytt file signature | application/octet-stream
YouTube Timed Text (subtitle) file
Magic Bytes
Offset 0
EF BB BF 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E
Sources: Gary Kessler
Extension
.ytt
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .ytt files in Python
def is_ytt(file_path: str) -> bool:
"""Check if file is a valid YTT by magic bytes."""
signature = bytes([0xEF, 0xBB, 0xBF, 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .ytt files in Node.js
function isYTT(buffer: Buffer): boolean {
const signature = Buffer.from([0xEF, 0xBB, 0xBF, 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E]);
return buffer.subarray(0, 16).equals(signature);
}
How to validate .ytt files in Go
func IsYTT(data []byte) bool {
signature := []byte{0xEF, 0xBB, 0xBF, 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
/api/v1/ytt
curl https://filesignature.org/api/v1/ytt
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .ytt file?
A .ytt file is a YouTube Timed Text file. YouTube Timed Text (subtitle) file
What are the magic bytes for .ytt files?
The magic bytes for YouTube Timed Text files are EF BB BF 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .ytt file?
To validate a .ytt file, read the first bytes of the file and compare them against the known magic bytes (EF BB BF 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .ytt files?
There is no officially registered MIME type for .ytt files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .ytt files?
YouTube Timed Text (.ytt) 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.