.pdf MIME Type: application/pdf

Files ending in .pdf (PDF document) use the MIME type application/pdf.

Updated

application/pdf
MIME type for .pdf
Documents
Category
No
Compress with gzip/Brotli

What is the MIME type of .pdf files?

The MIME type (media type) for PDF document files with the .pdf extension is application/pdf. Browsers show PDFs inline by default. Use Content-Disposition: attachment to force a download instead.

Content-Type header

Content-Type: application/pdf

Server configuration

ServerConfiguration
Nginx (mime.types or types {})application/pdf pdf;
Apache (.htaccess)AddType application/pdf .pdf
IIS (web.config)<mimeMap fileExtension=".pdf" mimeType="application/pdf" />
Node.js / Expressres.type('pdf') or res.setHeader('Content-Type', 'application/pdf')
Amazon S3Set Content-Type: application/pdf on the object (metadata), or pass --content-type application/pdf to aws s3 cp

Should .pdf files be compressed?

No. PDF document files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave application/pdf out of your compression configuration.

Why the MIME type matters

Browsers decide what to do with a response — render, run, play or download — from the Content-Type header, not the file extension. With X-Content-Type-Options: nosniff, a wrong type causes stylesheets and scripts to be blocked outright. For uploads, never trust the type sent by the client; check the file’s content (its magic bytes) on the server.

MIME type lookupSearch every common file extension and MIME type, with copy-ready Content-Type headers.
Search all MIME types

Frequently asked questions

What is the MIME type for .pdf?
application/pdf.
How do I set the Content-Type for .pdf in Nginx?
Make sure application/pdf pdf; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .pdf files?
No — the format is already compressed, so HTTP compression gives no benefit.