File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Documents
  • Page description
  • Word processing
  • Spreadsheets
  • Presentations
  • Ebooks
  • Text & markup
  • Fonts
  1. Home
  2. Documents
  3. Text & markup
  4. TXT
.TXT
  • Overview

.TXT

Plain Text

Introduction

A text file holds characters and nothing else: no fonts, no styles, no pictures. Every operating system can open one, and it is the simplest way to keep notes, logs and data that people need to read. What a text file does depend on is how its characters were turned into bytes, its encoding, and how its lines end.

Software

  • Notepad (Windows, built in)
  • TextEdit (macOS, built in)
  • Notepad++ (Windows)
  • Visual Studio Code (Windows, macOS, Linux)
  • Sublime Text (Windows, macOS, Linux)
  • BBEdit (macOS)
  • Vim (Windows, macOS, Linux)
  • GNU Emacs (Windows, macOS, Linux)

Structure

A text file has no header and no structure beyond its lines. Today most text is UTF-8, which stores ASCII characters as single bytes and everything else as two to four bytes. Older files may use a legacy code page such as Windows-1252, and a few use UTF-16. The file itself does not say which encoding it uses, except when it starts with a byte order mark.

First bytesMeaning
EF BB BFUTF-8 with a byte order mark
FF FEUTF-16, little-endian
FE FFUTF-16, big-endian

Lines end with a line feed (0A) on Linux and macOS, and with a carriage return and line feed (0D 0A) on Windows. Classic Mac OS used a carriage return (0D) alone.

© 2026 fileformats.org About Contact Made by Lewpen