text/*
text/plain
File extensions: .txt, .log
Unformatted UTF-8 text — the default for .txt and log files.
What is text/plain?
text/plain is the media type for unformatted text with no markup and no styling. It is the simplest and most compatible way to serve human-readable content.
Typical usage
Log downloads, plain text exports, debugging endpoints, .txt files.
Common gotchas
Browsers render text/plain without HTML parsing — angle brackets show as literal characters. If you want the browser to render markup, use text/html.
HTTP header example
Response header
Content-Type: text/plain; charset=utf-8Reference
RFC 2046 §4.1.3
Frequently asked questions
What is the text/plain MIME type?
text/plain is the media type for unformatted text with no markup and no styling. It is the simplest and most compatible way to serve human-readable content.
What file extension does text/plain use?
Files served as text/plain typically use the extensions .txt, .log. The most common is .txt.
How do I set the Content-Type for text/plain?
Send the HTTP response header Content-Type: text/plain; charset=utf-8. Log downloads, plain text exports, debugging endpoints, .txt files.
Is text/plain an official MIME type?
Yes. text/plain is officially registered with IANA (RFC 2046 §4.1.3), so standards-conformant clients recognize it.
What are common mistakes with text/plain?
Browsers render text/plain without HTML parsing — angle brackets show as literal characters. If you want the browser to render markup, use text/html.