# .srt MIME Type: application/x-subrip

> The most common subtitle format: numbered cues with start and end timestamps.

- MIME type: `application/x-subrip`
- Extensions: .srt
- Content-Type header: `application/x-subrip; charset=utf-8`
- Compress in transit: yes

## Good to know

- The browser's `<track>` element only supports WebVTT. To convert SRT, add a `WEBVTT` line 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.

## Server configuration

### 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">
```

## FAQ

### 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

- [.vtt — text/vtt](https://www.devkult.com/mime/vtt.md)
- [.mp4 — video/mp4](https://www.devkult.com/mime/mp4.md)
- [.mkv — video/matroska](https://www.devkult.com/mime/mkv.md)

Open the interactive page: https://www.devkult.com/mime/srt