devkult_
tools29converters34
home/mime/.otf

.otf MIME type

OpenType fontfonts

font/otf

OpenType desktop fonts. Convert to WOFF2 for the web.

MIME typefont/otf
Extensions.otf
Also seen asapplication/x-font-opentype
Content-Typefont/otf
Compress in transit?Yes — enable gzip or Brotli
File signature4F 54 54 4F (OTTO)
for CFF-based fonts; TrueType-flavoured OpenType starts 00 01 00 00

Good to know

  • Uncompressed, so enable gzip or Brotli if you serve OTF files.

Serve .otf files with the right type

The response header to send:

Content-Type: font/otf

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)
font/otf otf;
Apache (.htaccess or server config)
AddType font/otf .otf
Express
res.set("Content-Type", "font/otf");
Python
import mimetypes

mimetypes.add_type("font/otf", ".otf")
HTML file input
<input type="file" accept=".otf,font/otf">

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.otf | grep -i '^content-type:'
file --mime-type file.otf

Frequently asked questions

What is the MIME type for .otf files?

font/otf. You may also see application/x-font-opentype, but font/otf is the one to send.

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

Content-Type: font/otf. It compresses well, so let the server apply gzip or Brotli.

How can I tell if a file is really a .otf?

Check its bytes rather than the extension: OTF files start with 4F 54 54 4F (OTTO) — for CFF-based fonts; TrueType-flavoured OpenType starts 00 01 00 00. On the command line, file --mime-type name.otf does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options