.docx MIME Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

Files ending in .docx (Microsoft Word) use the MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document.

Updated

application/vnd.openxmlformats-officedocument.wordprocessingml.document
MIME type for .docx
Documents
Category
No
Compress with gzip/Brotli

What is the MIME type of .docx files?

The MIME type (media type) for Microsoft Word files with the .docx extension is application/vnd.openxmlformats-officedocument.wordprocessingml.document. A ZIP archive of XML files, so it is already compressed. Old servers that do not know the type may serve DOCX files as application/zip, which makes browsers save them as .zip.

Content-Type header

Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=utf-8

Text-based types should include a charset so the browser decodes characters correctly.

Server configuration

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

Should .docx files be compressed?

No. Microsoft Word files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave application/vnd.openxmlformats-officedocument.wordprocessingml.document 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 .docx?
application/vnd.openxmlformats-officedocument.wordprocessingml.document.
How do I set the Content-Type for .docx in Nginx?
Make sure application/vnd.openxmlformats-officedocument.wordprocessingml.document docx; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .docx files?
No — the format is already compressed, so HTTP compression gives no benefit.