What Is This?
The text/plain MIME type indicates that the content is plain, unformatted text. No markup, no styling — just raw characters. Browsers display text/plain content in a simple monospace view or download it depending on the context.
Common Uses
README files and documentation
Log file downloads
Source code responses from APIs
Fallback content type when no other type applies
Examples
Supported by all browsers. Text is displayed in the browser window or downloaded as a .txt file.
The .txt file extension maps to text/plain as its MIME type.
Related Entries
More from this reference:
text/html
The MIME type for HTML documents, the standard markup language for web pages.
text/css
The MIME type for Cascading Style Sheets used to style HTML documents.
text/javascript
The MIME type for JavaScript source files used to add interactivity to web pages.
text/csv
The MIME type for Comma-Separated Values data files.
Frequently Asked Questions
When should I use text/plain vs text/html?
Use text/plain for raw text that should not be rendered or formatted (logs, code output, simple data). Use text/html for web pages and formatted content that should be rendered by the browser.
Does text/plain support character encoding?
Yes. You can specify encoding with the charset parameter, e.g., Content-Type: text/plain; charset=utf-8. UTF-8 is the default.