Skip to content

TXT File Format (.txt)

A TXT file is a sequence of characters and line breaks with no formatting, container or metadata at all, so the only two things that determine whether it opens correctly on another machine are its character encoding and its line-ending convention.

.txtDocuments

TXT at a glance#

Full namePlain text
File extension.txt
CategoryDocuments
MIME typestext/plain
CompressionUncompressed
SpecificationRFC 2046 (MIME text/plain)
FileFlip supportFileFlip reads and writes this format

What a .txt file can hold#

These are the things a TXT file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Embedded metadataNo
Selectable textYes
Human readableYes
CommentsNo

Strengths and limitations of TXT#

What TXT does well

  • Opens correctly on every operating system and in every text editor ever made, with no version to mismatch
  • Diffs and merges cleanly in version control, since there's no markup to conflict with
  • The smallest possible file for a given amount of text, since there's no formatting or container overhead
  • Never goes obsolete, because there's no proprietary structure for a vendor to stop supporting

Where TXT falls short

  • Carries no character encoding declaration inside the file, so a UTF-8 file opened as a legacy code page like Windows-1252 turns accented characters into garbled text
  • Windows writes CRLF line endings while Unix, Linux and macOS write LF, so a file created on one and opened raw on the other can show as one long line, or with stray characters at every line break
  • No bold, italics, headings, tables or images, only what can be expressed as characters
  • A UTF-8 byte order mark that some Windows tools add at the start of the file confuses parsers that don't expect it

Use TXT for anything a script, a diff tool or a command line will read, or when the destination genuinely needs the words with no formatting attached.

Convert TXT to DOCX or PDF when the plain words need headings, styling or a fixed page layout added on top of them.

How to open a .txt file#

A .txt file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts TXT into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
WindowsNotepad, Notepad++, Visual Studio Code
macOSTextEdit, Visual Studio Code
Linuxgedit, Vim, Nano
WebFileFlip, Google Docs

TXT questions people ask#

Why do accented characters turn into strange symbols when I open a TXT file?

A TXT file has no way to declare its own character encoding, so the program opening it has to guess. When a file saved as UTF-8 gets opened as a legacy encoding like Windows-1252 instead, multi-byte characters like é or emoji get reinterpreted as several unrelated symbols, a corruption usually called mojibake.

Why does a TXT file made on Windows show as one giant line on Mac or Linux?

Windows ends each line with two characters, carriage return and line feed (CRLF), while Unix, Linux and modern macOS use just a line feed (LF). A program that only recognizes LF as a line break sees a CRLF file's carriage returns as ordinary characters, so the whole file can appear as one unbroken line until it's reopened with the correct convention.

What is a byte order mark and why does it show up at the start of a TXT file?

A byte order mark, or BOM, is an invisible marker some Windows tools add to the start of a UTF-8 TXT file to flag its encoding. Software that doesn't expect it can render it as stray characters like  at the very start of the text, or count it as part of the first line of content.

Is a TXT file the same on every operating system?

The characters themselves are, but a TXT file's encoding and line endings follow different conventions by platform, and those are exactly what break when the file moves between them. A file that looks fine where it was created can show garbled accents or mangled line breaks the moment it's opened somewhere else.

Converting TXT files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.