Skip to content

VTT (.vtt)

.vtt file signature | text/vtt

WebVTT (VTT) is a text-based caption and subtitle file format standardized by the W3C and WHATWG for use with web media. It is used for subtitles, captions, chapter markers, and text tracks in HTML5 video players, streaming platforms, and media authoring tools. The format is generally safe because it is plain text, though untrusted files may still be used to mislead viewers or reference external resources in some players.

Safe

Magic Bytes

Offset 0
57 45 42 56 54 54 0D

Sources: Apache Tika

All Known Signatures

5 signature variants are documented for .vtt files across multiple sources.

Hex Signature Offset Sources
57 45 42 56 54 54 0D 0 Apache Tika
57 45 42 56 54 54 0A 0 Apache Tika
57 45 42 56 54 54 20 46 49 4C 45 0D 0 Apache Tika
57 45 42 56 54 54 20 46 49 4C 45 0A 0 Apache Tika
57 45 42 56 54 54 20 0 Apache Tika

Extension

.vtt

MIME Type

text/vtt

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .vtt files in Python

Python
def is_vtt(file_path: str) -> bool:
    """Check if file is a valid VTT by magic bytes."""
    signature = bytes([0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0D])
    with open(file_path, "rb") as f:
        return f.read(7) == signature

How to validate .vtt files in Node.js

Node.js
function isVTT(buffer: Buffer): boolean {
  const signature = Buffer.from([0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0D]);
  return buffer.subarray(0, 7).equals(signature);
}

How to validate .vtt files in Go

Go
func IsVTT(data []byte) bool {
    signature := []byte{0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0D}
    if len(data) < 7 {
        return false
    }
    return bytes.Equal(data[:7], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .vtt file?

A .vtt file is identified by the magic bytes 57 45 42 56 54 54 0D at byte offset 0. WebVTT (VTT) is a text-based caption and subtitle file format standardized by the W3C and WHATWG for use with web media. It is used for subtitles, captions, chapter markers, and text tracks in HTML5 video players, streaming platforms, and media authoring tools. The format is generally safe because it is plain text, though untrusted files may still be used to mislead viewers or reference external resources in some players.

What are the magic bytes for .vtt files?

The magic bytes for VTT files are 57 45 42 56 54 54 0D at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .vtt file?

To validate a .vtt file, read the first bytes of the file and compare them against the known magic bytes (57 45 42 56 54 54 0D) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .vtt files?

The primary MIME type for .vtt files is text/vtt.

Is it safe to open .vtt files?

VTT (.vtt) 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.