SubRip Subtitle
An SRT file stores timed subtitles as numbered plain-text blocks with millisecond timecodes, created in 1999 in France — its comma decimal separator (00:01:30,500) is a direct artifact of French numeric convention that persists in every SRT file written today.
SRT conversion is not yet available in FileDex. Use the CLI commands in the Technical Reference below to convert between subtitle formats with FFmpeg.
Common questions
What is an SRT file?
An SRT file is a SubRip Text subtitle file containing timed text blocks for video playback. Each block has a sequence number, start/end timecodes in HH:MM:SS,mmm format, and the subtitle text. The format was created in France in 1999 and is accepted by YouTube, VLC, and virtually every video platform.
How do I convert SRT to VTT?
Drop your SRT file into FileDex's converter and select VTT as the output format. The conversion adds the required WEBVTT header and replaces the comma decimal separator with a period in all timecodes. This conversion is necessary for HTML5 video players on the web, which require VTT and cannot use SRT natively.
How do I create an SRT file?
Open any text editor and write numbered blocks with timecodes and text. Each block needs a sequence number, a timecode line (00:00:01,000 --> 00:00:04,000), subtitle text, and a blank line after. Save as .srt with UTF-8 encoding. Subtitle Edit and Aegisub provide visual timeline editors for easier authoring.
Can you convert audio or video to SRT?
Generating SRT from audio or video requires speech recognition, not file conversion. Services like YouTube's auto-captioning, Whisper (OpenAI), and Amazon Transcribe can produce SRT output from audio. FileDex handles format conversion between existing subtitle files, not speech-to-text transcription.
What's the difference between SRT and VTT?
VTT (WebVTT) is the web-standards successor to SRT, created by the WHATWG in 2010. VTT uses a period instead of a comma in timecodes, requires a WEBVTT header, supports CSS styling via ::cue, and is the only format HTML5 <track> accepts natively. SRT has broader platform acceptance for file uploads.
What encoding should I use for SRT files?
Use UTF-8. YouTube requires UTF-8 for SRT uploads. MKV containers mandate UTF-8 for embedded subtitles. Most modern subtitle tools default to UTF-8 output. The original SubRip software used Windows-1252, which only covers Western European characters — files in that encoding will show garbled text for non-Latin scripts.
Why do SRT files use a comma instead of a period in timecodes?
The comma is inherited from French numeric convention, where commas serve as the decimal separator (3,14 instead of 3.14). Brain, the developer who created SubRip in France in 1999, used the locale-native comma in the timecode format. WebVTT switched to a period when it standardized the format for international web use.
What makes .SRT special
What is an SRT file?
SRT stores timed subtitle text as sequentially numbered plain-text blocks, each containing a sequence counter, a start-to-end timecode range, and one or more lines of display text separated by blank lines. Accepted by YouTube, Facebook, Vimeo, VLC, and virtually every video player, it is the most widely distributed subtitle format on the internet. A French developer known as "Brain" created the format in 1999 as the output of SubRip, a Delphi application that OCR-ripped subtitle text from DVD video frames. The format has no formal specification. Every behavior — encoding, formatting, positioning — is defined purely by convention, and that looseness is both the reason SRT spread everywhere and the source of its most persistent bugs.
Continue reading — full technical deep dive
File structure anatomy
Each subtitle block contains exactly four components:
1
00:02:17,440 --> 00:02:20,375
Senator, we're making
our final approach into Coruscant.
2
00:02:20,476 --> 00:02:22,501
Very good, Lieutenant.
Line 1: Sequence counter. A positive integer starting at 1. Most players ignore this number entirely and rely on timecode order instead. Gaps or duplicates rarely cause failures, but some editors use the counter for navigation.
Line 2: Timecode range. Start and end times separated by --> (spaces around the arrow are required by convention). The format is HH:MM:SS,mmm — hours, minutes, seconds, and comma-separated milliseconds. That comma, not a period, is the single most common source of SRT parsing failures when files are hand-edited.
Lines 3+: Subtitle text. One or more lines of display text. Most players wrap at two lines. There is no hard limit, but text beyond three lines typically overflows the safe area.
Blank line: Block delimiter. An empty line separates blocks. Missing blank lines cause parsers to merge blocks; extra blank lines between blocks are usually tolerated.
The French connection
The comma in 00:02:17,440 is not arbitrary. In French numeric convention, the comma serves as the decimal separator — where English writes 3.14, French writes 3,14. Brain built SubRip in France, and the timecode format inherited this convention directly. Every SRT file written since 1999 carries this French fingerprint. WebVTT, its successor, switched to a period (00:02:17.440), which is one of several reasons the two formats are not drop-in replaceable despite looking nearly identical.
The encoding minefield
SRT has no encoding declaration mechanism. There is no byte-order mark requirement, no header field, no metadata block. The original SubRip software ran on Windows and produced Windows-1252 encoded files. That encoding covers Western European characters but fails on Arabic, Chinese, Japanese, Korean, Cyrillic, and most other scripts.
YouTube requires UTF-8 for SRT uploads. Matroska (MKV) containers mandate UTF-8 for embedded subtitle streams. FFmpeg defaults to UTF-8 when extracting or converting SRT. But a subtitle file downloaded from a fan-translation site, ripped from a DVD-era release, or exported from older subtitle software is almost certainly Windows-1252 or the local system codepage.
The practical result: garbled characters. Accented letters in French or Spanish render as mojibake. Arabic or CJK text disappears or displays as replacement characters. The fix is explicit re-encoding — iconv, recode, or a text editor's "Reopen with Encoding" function. Subtitle Edit detects encoding heuristically and offers one-click conversion to UTF-8 with BOM, which is the safest portable choice.
Formatting extensions
The core SRT format is plain text with no styling. In practice, many players support a subset of HTML-like tags:
<b>bold</b>— supported by VLC, YouTube, most media players<i>italic</i>— widely supported<u>underline</u>— less consistently supported<font color="#FFFF00">colored text</font>— VLC and some players honor this; YouTube strips it
A positioning extension using coordinate tags ({\an8} or X1:nnn X2:nnn Y1:nnn Y2:nnn appended to the timecode line) exists in some implementations. VLC supports the {\an} positional tags borrowed from SSA/ASS syntax. YouTube ignores all positioning.
None of these extensions are standardized. A file that looks correct in VLC may render as raw HTML tags in another player. This inconsistency is the primary motivation behind WebVTT's formalized styling model.
WebVTT: the intended successor
In 2010, the WHATWG proposed a web-native subtitle format initially called "WebSRT" — a direct nod to SubRip's dominance. The format was renamed WebVTT (Web Video Text Tracks) before standardization. WebVTT inherits SRT's basic structure (timecoded text blocks) but adds a required WEBVTT header, replaces the comma with a period in timecodes, defines CSS-based styling via ::cue selectors, and supports positioning through explicit percentage-based coordinates.
HTML5's <track> element requires WebVTT. SRT cannot be used with <track> without conversion. This means every web-native video player that uses the standard HTML5 subtitle API needs VTT files, not SRT. YouTube accepts SRT uploads but converts them to a proprietary timed-text format server-side. Browser-based players that appear to support SRT are typically running a JavaScript shim that parses SRT and renders the text outside the native <track> pipeline.
Platform compatibility
YouTube added SRT support on August 28, 2008, making it the first major platform to accept user-uploaded subtitles. Facebook requires a specific filename convention: filename.en_US.srt for English (US). Vimeo, Twitter/X, and LinkedIn all accept SRT uploads. VLC, mpv, MPC-HC, and PotPlayer handle SRT natively, both as external sidecar files and as streams embedded in MKV containers.
YouTube added WebVTT support in April 2013. Firefox shipped native WebVTT rendering in Firefox 31 on July 24, 2014. By that point, WebVTT had a formal spec and browser vendor buy-in, but SRT's installed base — millions of subtitle files already distributed — ensured the older format's continued dominance for file-based distribution.
Limitations and why they persist
The absence of a formal specification means every SRT implementation is a best-effort interpretation. Edge cases — overlapping timecodes, missing sequence numbers, inconsistent line endings, BOM bytes mid-file, HTML tags in players that do not support them — produce different results in different players. There is no authoritative reference to consult when two players disagree.
SRT carries no metadata: no language tag, no font specification, no author field, no version number. When you embed an SRT stream in an MKV container, the language tag comes from the container, not the subtitle file. A standalone .srt file gives no machine-readable indication of what language it contains.
Character encoding remains the format's deepest structural weakness. Twenty-five years after its creation, a format used by millions of files worldwide still has no standard way to declare its own encoding. UTF-8 has won by platform mandate (YouTube, MKV, FFmpeg), but the long tail of legacy files encoded in Windows-1252, Shift-JIS, EUC-KR, and GB2312 guarantees that encoding detection heuristics will remain necessary for years to come.
.SRT compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .SRT vs .VTT | Specification status SRT has no formal specification — behavior is defined by convention from the 1999 SubRip software. WebVTT has a W3C specification maintained by the WHATWG since 2010. | VTT wins |
| .SRT vs .VTT | HTML5 browser support HTML5 <track> elements require WebVTT natively. SRT cannot be used with <track> without JavaScript conversion. Firefox added native VTT support in Firefox 31 (July 2014). | VTT wins |
| .SRT vs .VTT | Styling capability VTT supports CSS-based styling via ::cue selectors and percentage-based positioning. SRT has only unofficial HTML tags (<b>, <i>, <font color>) with inconsistent player support. | VTT wins |
| .SRT vs .ASS | Styling capability ASS supports named styles with font, color, border, shadow, rotation, animation, and pixel-precise positioning. SRT is limited to basic bold/italic/underline with no standardized support. | ASS wins |
| .SRT vs .ASS | Platform acceptance YouTube, Facebook, Vimeo, Twitter/X, and LinkedIn all accept SRT uploads. ASS support is limited to desktop players like VLC and media centers; streaming platforms reject it. | SRT wins |
| .SRT vs .VTT | Encoding standard WebVTT requires UTF-8 encoding. SRT has no encoding standard — files may be Windows-1252, Shift-JIS, or any codepage, causing frequent mojibake. | VTT wins |
| .SRT vs .VTT | YouTube support YouTube has accepted SRT since August 2008 and VTT since April 2013. Both are first-class upload formats. YouTube converts both to an internal timed-text format server-side. | Draw |
Related Formats
Technical reference
- MIME Type
application/x-subrip- Developer
- Brain (SubRip author)
- Year Introduced
- 1999
- Open Standard
- Yes
Binary Structure
SRT is a pure plain-text format with no binary structure, magic bytes, or file header. Each subtitle block contains four components in sequence: (1) a sequence counter as a positive integer on its own line, (2) a timecode line in the format HH:MM:SS,mmm --> HH:MM:SS,mmm where the comma separates seconds from milliseconds, (3) one or more lines of subtitle text, and (4) a blank line delimiter. The PRONOM signature (fmt/1218) identifies SRT files by matching the timecode pattern within the first 64 bytes. There is no encoding declaration — files may be Windows-1252, UTF-8, UTF-8 with BOM, or any other text encoding. Line endings vary between CRLF (Windows) and LF (Unix) with no standard requirement.
Attack Vectors
- HTML injection via unofficial <font> and <b> tags — players that render SRT markup as HTML without sanitization could execute injected script tags, though no mainstream player is known to be vulnerable
- Encoding-based confusion — a crafted SRT file using mixed encodings or BOM manipulation could cause subtitle text to render misleadingly, though this is a display issue rather than a code execution risk
- Oversized subtitle blocks — an SRT file with extremely long text lines or millions of blocks could cause memory exhaustion in parsers that load the entire file into memory
Mitigation: SRT is a plain-text format with no execution capability. FileDex processes SRT files entirely in the browser. Subtitle text is treated as display-only content with no script evaluation or external resource loading.