TextText-based
text/plain
Plain Text
Reference for text/plain, the fundamental MIME type for unformatted text content without any markup or styling.
MIME Type Detector
Drop a file to detect its MIME type — no upload, runs in your browser
📄
Drop any file here or click to choose
Expected extensions: .txt, .text, .log
HTTP Content-Type Header
HTTP Header
Content-Type: text/plain; charset=utf-8Associated File Extensions
.txt.text.log
Quick Facts
| MIME Type | text/plain |
| Category | Text |
| Type | Text-based (human-readable) |
| Extensions | .txt, .text, .log |
Common Usage
Plain text is the simplest and most universal text format. It is used for README files, configuration files, log files, source code (as a fallback), and any content that should be displayed without formatting.
Virtually every text editor and programming language can read plain text.
Code Examples
HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.txt" type="text/plain">
<!-- Or for script/media elements -->
<script type="text/plain" src="file.txt"></script>Node.js
// Express.js
app.get('/file', (req, res) => {
res.type('text/plain');
res.send(data);
});
// Node.js http
res.writeHead(200, { 'Content-Type': 'text/plain' });nginx
# nginx.conf — add to types block or use default
types {
text/plain txt text log;
}
# Or set for a specific location
location /api/ {
default_type text/plain;
}Related MIME Types
More Text MIME Types
Other text types in the Text family
Related Tools
Explore More MIME Types
Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.