.srt MIME type
SubRip subtitlestext & code
application/x-subripThe most common subtitle format: numbered cues with start and end timestamps.
| MIME type | application/x-subrip |
|---|---|
| Extensions | .srt |
| Content-Type | application/x-subrip; charset=utf-8 |
| Compress in transit? | Yes — enable gzip or Brotli |
Good to know
- The browser's
<track>element only supports WebVTT. To convert SRT, add aWEBVTTline at the top and change the comma in each timestamp to a dot (00:01:02,500→00:01:02.500). - Older SRT files are often Windows-1252 rather than UTF-8. If accented characters come out garbled, re-encode the file before converting it.
Serve .srt files with the right type
The response header to send:
Content-Type: application/x-subrip; charset=utf-8
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
application/x-subrip srt;
Apache (.htaccess or server config)
AddType application/x-subrip .srt
Express
res.set("Content-Type", "application/x-subrip; charset=utf-8");Python
import mimetypes
mimetypes.add_type("application/x-subrip", ".srt")HTML file input
<input type="file" accept=".srt,application/x-subrip">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.srt | grep -i '^content-type:' file --mime-type file.srt
Frequently asked questions
What is the MIME type for .srt files?
application/x-subrip.
What Content-Type header should a .srt file be served with?
Content-Type: application/x-subrip; charset=utf-8. As a text format, include the charset so browsers don't guess the encoding. It compresses well, so let the server apply gzip or Brotli.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options