Skip to main content

text/plain

text

The MIME type for unformatted plain text. Browsers display text/plain as-is without HTML parsing. Used for log files, README files, and any response where you want the browser to show raw text rather than render it as HTML. Default charset for text/* is ISO-8859-1 – always specify utf-8.

Details

text/plain is the fallback for any text that is not a more specific format. RFC 2046 §4.1.3 defines it as the default text subtype.

Charset default: unlike application/* where UTF-8 is the de facto default, text/* types default to ISO-8859-1 per HTTP/1.1. Always specify Content-Type: text/plain;charset=utf-8.

Browser behavior: text/plain content is displayed as-is. HTML tags are not interpreted. This makes text/plain safe for displaying untrusted content that might contain HTML.

llms.txt and robots.txt: both are served as text/plain. Many developer tools (llms.txt spec) use text/plain for machine-readable site metadata.

Parameters

ParameterDescription
charsetCharacter encoding. Default is ISO-8859-1 for text/*; specify utf-8 explicitly.

Common use

Plain text files, log output, robots.txt, llms.txt, README files

See Also