file in abyss
Back to formats

Subtitle

SRT SubRip Subtitle

SubRip Subtitle is a subtitle format commonly identified by .srt. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .srt
MIME application/x-subrip, text/plain

Magic numbers

Analyze your file
offset 0 SubRip Subtitle leading signature
31 0A 30 30 3A 30 30
1.00:00

Structure

  1. Sequence number
  2. Time range
  3. Subtitle text
  4. Blank line

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 31 0A 30 30 3A 30 30, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("310a30303a3030")
OFFSET = 0

def is_srt(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

SubRip Subtitle is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.

Common detection mistakes

  • The .srt extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • SubRip Subtitle can start with signatures such as 31 0A 30 30 3A 30 30, but related containers and damaged files may require additional validation.

Security notes

Untrusted input is not safe just because the format was detected. Account for parser exceptions, large files, unexpected encodings, and external references.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Sub

Blue Sky SRT

Blue Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.srt
Type Sample
Small file
58 B
SHA-256 df98bfdbc94f9a020161538cf6d26234861f300a7c090158735eba993762e5a4
Download
Sub

Flower Garden SRT

Flower Garden SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.srt
Type Sample
Small file
145 B
SHA-256 0cfd87b4517ffe51778c7f0d6387d4e83cecf7ff950226f897f6f9a7dfae4956
Download
Sub

Navy Blue Sky SRT

Navy Blue Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.srt
Type Sample
Small file
191 B
SHA-256 494bd539264047912fa02785b36a80474c8b5b0b6e079967ef4bf236568fdcde
Download
Sub

Nature of the Sky SRT

Nature of the Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.srt
Type Sample
Small file
259 B
SHA-256 466d40a2e987a462611e234655d5020ed9c3a0c78971311828dfbc8ef8df68d3
Download
Sub

Sky Landscape SRT

Sky Landscape SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.srt
Type Sample
Small file
364 B
SHA-256 82aef437534e82862820628e3868d631672f56ea21f808814b4c4e867e16f13d
Download
Sub

Starry Sky SRT

Starry Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.srt
Type Sample
Small file
311 B
SHA-256 e0a400c54266cf8af4940679e89e29d510baaf45fba5766cbff603bb45667ff6
Download
Sub

Blue Night Sky SRT

Blue Night Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.srt
Type Sample
Small file
433 B
SHA-256 a13e8e06c9db6cbdb6b97d17948bb5c39ccedcd441ee5d25e3a64a4e83b939a0
Download
Sub

Hibiscus Flower SRT

Hibiscus Flower SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.srt
Type Sample
Small file
599 B
SHA-256 f618dc19ae2bebe46ca4defe0db51f596b9209c4c8cd2ddbe6988dd672c85fb7
Download
Sub

Arctic Sky SRT

Arctic Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.srt
Type Sample
Small file
548 B
SHA-256 b40fc412ab14f1ccc272c96b890f8bf7f5b6fe4ad134f5cb14cde3e8423677be
Download
Sub

Sunset Rays SRT

Sunset Rays SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

10-sunset-rays.srt
Type Sample
Small file
620 B
SHA-256 7419b45bc6adcb4b91eb64665474d99716f835bdc50b771e45d9c19b61b70807
Download
Sub

NASA Blue Marble SRT

NASA Blue Marble SRT is a SubRip Subtitle sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.srt
Type Sample
1.1 KB
SHA-256 4d5b3cd6f6de5de54a34fdceb6fa30f7cf6e88bc695b78311164b2aaa621439f
Download

Frequently asked questions

What is the magic number (file signature) of SubRip Subtitle?

SubRip Subtitle files begin with the byte signature 31 0A 30 30 3A 30 30 ("1.00:00"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of SubRip Subtitle?

The MIME type for SubRip Subtitle is application/x-subrip, text/plain.

What file extension does SubRip Subtitle use?

SubRip Subtitle files use the .srt extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.