# .rtf MIME Type: application/rtf

> Formatted text readable by nearly every word processor.

- MIME type: `application/rtf`
- Extensions: .rtf
- Also seen as: `text/rtf`
- Content-Type header: `application/rtf`
- Compress in transit: yes
- File signature: `7B 5C 72 74 66`

## Good to know

- RTF is plain text with control words, so it compresses well.

## Server configuration

### nginx (inside the types block in mime.types)

```
application/rtf rtf;
```

### Apache (.htaccess or server config)

```
AddType application/rtf .rtf
```

### Express

```
res.set("Content-Type", "application/rtf");
```

### Python

```
import mimetypes

mimetypes.add_type("application/rtf", ".rtf")
```

### HTML file input

```
<input type="file" accept=".rtf,application/rtf">
```

## FAQ

### What is the MIME type for .rtf files?

`application/rtf`. You may also see `text/rtf`, but `application/rtf` is the one to send.

### What Content-Type header should a .rtf file be served with?

`Content-Type: application/rtf`. It compresses well, so let the server apply gzip or Brotli.

### How can I tell if a file is really a .rtf?

Check its bytes rather than the extension: RTF files start with `7B 5C 72 74 66` (`{\rtf`). On the command line, `file --mime-type name.rtf` does this for you.

## Related types

- [.doc — application/msword](https://www.devkult.com/mime/doc.md)
- [.docx — application/vnd.openxmlformats-officedocument.wordprocessingml.document](https://www.devkult.com/mime/docx.md)
- [.txt — text/plain](https://www.devkult.com/mime/txt.md)

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