.txt File Extension

Learn what a .txt file contains, how text encoding affects compatibility, which apps open TXT files, and how Poly supports them.

File extension details for .txt

Full Support
File typePlain-text file
MIME type
EncodingText, preferably Unicode encoded as UTF-8
Operating systemsWindows, macOS, Linux, iOS, Android
Opens withMicrosoft Notepad, Apple TextEdit, Visual Studio Code, Web browsers
Poly supportYes. Poly provides rich support for readable TXT files.
Indexed by PolyYes. Poly indexes filenames and readable text for exact and meaning-based search.
Preview in PolyYes. TXT files open in Poly's code-friendly text editor.
Poly agentYes. The Poly agent can read and reason about the file's text.

What kind of file is a .txt?

A .txt file normally contains plain text: characters and line breaks without required fonts, images, page layout, or formatting commands. Its standard media type is text/plain. The suffix is a convention rather than proof of the content, and plain text has no fixed magic bytes.1

Character encoding matters. ASCII is limited, while UTF-8 can represent the full Unicode repertoire and is the safest modern choice for sharing text. A file may also begin with a byte order mark, but many UTF-8 files do not. Software therefore relies on declared metadata, the filename, and cautious content detection rather than a universal signature.

Renaming a Word document, image, or other binary file to .txt does not convert it. Export or save the original as plain text instead.

How do I open a .txt on my computer?

TXT files work on virtually every current platform:

  • On Windows, use Notepad, Visual Studio Code, or another text editor.
  • On macOS, use TextEdit in plain-text mode, a code editor, or Terminal tools.
  • On Linux, use the desktop text editor, Vim, Emacs, Nano, or a code editor.
  • On iPhone, iPad, and Android, use a files app or text-editing app.

If accented letters, emoji, or non-Latin writing looks garbled, reopen the file using its original encoding before saving it as UTF-8. Also watch line endings. Local Unix-like files commonly use LF, while Windows files often use CRLF. Most modern editors accept both, but scripts and version-control diffs may treat them differently.2

Poly support for .txt

Poly opens readable TXT files in a code-friendly editor, indexes their content for exact and semantic search, and makes the text available to the Poly agent. Search results can focus on the relevant text range, which is useful for notes, logs, transcripts, and exported records.

UTF-8 gives the most reliable results. A legacy encoding or binary file disguised with a .txt suffix may display incorrectly or remain unavailable for content-aware search.

History of .txt

The suffix grew from the simple practice of labeling files that held text rather than a specialized binary format. MIME formally introduced text/plain in RFC 1341 in June 1992, and RFC 2046 replaced that definition in 1996.3

In 2008, RFC 5147 documented .txt as the commonly used filename extension for plain text and standardized URI fragments for addressing character and line ranges.1 The format stayed useful because it depends on very little, but encoding and newline conventions still have to be agreed upon.

Working with .txt and alternatives

Choose a format based on the structure you need:

FormatPreservesGood for
TXTCharacters and line breaksNotes, logs, simple interchange
Markdown (.md)Lightweight markupReadable source with headings and links
CSV (.csv)Delimited rows and fieldsTabular data exchange
RTF (.rtf)Fonts and document stylingPortable formatted documents

Converting a rich document to TXT discards styling, tables, images, tracked changes, and page layout. Apple specifically notes that changing a rich-text document to plain text removes its styles and saves the result as .txt.4 Keep the original when you may need that information later.

Plain text is not automatically harmless. It can contain terminal escape sequences, misleading bidirectional Unicode controls, secrets, or instructions that another tool interprets. Inspect an unfamiliar file in a modern editor before printing it to a terminal or passing it to a command.1

Footnotes

  1. Internet Engineering Task Force. RFC 5147: URI Fragment Identifiers for the text/plain Media Type. Describes plain text, the conventional .txt suffix, portability, line addressing, and security considerations. 2 3
  2. Internet Engineering Task Force. RFC 2046: Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types. Defines text/plain, its charset parameter, and canonical MIME line breaks.
  3. Internet Engineering Task Force. RFC 1341: MIME (Multipurpose Internet Mail Extensions). The June 1992 specification introduced the text/plain subtype; RFC 2046 later made RFC 1341 obsolete.
  4. Apple Support. Create, Open, and Convert Documents in TextEdit on Mac. Documents plain-text creation, opening, conversion, and the loss of formatting.
© Poly Corp. 2026