# .eps MIME Type: application/postscript

> PostScript and Encapsulated PostScript vector graphics, plus the Illustrator files that share the type.

- MIME type: `application/postscript`
- Extensions: .eps, .ps, .ai
- Content-Type header: `application/postscript`
- Compress in transit: yes
- File signature: `25 21 50 53` (EPS files with a binary preview header start with C5 D0 D3 C6 instead)

## Good to know

- Browsers can't display PostScript. Ghostscript converts it to PDF or PNG; Inkscape can import it for SVG.
- Illustrator files saved with PDF compatibility (the default since CS) start with `%PDF` rather than `%!PS`, though servers still map `.ai` to `application/postscript`.

## Server configuration

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

```
application/postscript eps ps ai;
```

### Apache (.htaccess or server config)

```
AddType application/postscript .eps .ps .ai
```

### Express

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

### Python

```
import mimetypes

mimetypes.add_type("application/postscript", ".eps")
mimetypes.add_type("application/postscript", ".ps")
mimetypes.add_type("application/postscript", ".ai")
```

### HTML file input

```
<input type="file" accept=".eps,.ps,.ai,application/postscript">
```

## FAQ

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

`application/postscript`. The same type covers .ps, .ai.

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

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

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

Check its bytes rather than the extension: EPS files start with `25 21 50 53` (`%!PS`) — EPS files with a binary preview header start with C5 D0 D3 C6 instead. On the command line, `file --mime-type name.eps` does this for you.

## Related types

- [.pdf — application/pdf](https://www.devkult.com/mime/pdf.md)
- [.svg — image/svg+xml](https://www.devkult.com/mime/svg.md)
- [.psd — image/vnd.adobe.photoshop](https://www.devkult.com/mime/psd.md)

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