.TXT file extension

To open .TXT files on Windows, right-click the file and select 'Open with', then choose Notepad or another text editor.

TXT files are plain text files that can be opened with any text editor, code editor, or terminal viewer. To open a .txt file, use applications like Notepad, TextEdit, or any code editor.

Last updated: March 19, 2026 · Reviewed by Julian Stricker

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .TXT files

Use these platform-specific instructions to open .TXT files safely.

Windows

  1. Right-click the file and select 'Open with', then choose Notepad or another text editor.
  2. Use Notepad++ or VS Code for more advanced editing features.
Full Windows guide

Mac

  1. Double-click the file to open it with TextEdit.
  2. For larger files or coding, use VS Code or Sublime Text.
Full Mac guide

Linux

  1. Double-click the file to open with the default text editor like gedit or Kate.
  2. Use terminal commands like 'nano filename.txt' or 'vim filename.txt' for quick edits.
Full Linux guide

iOS

  1. Open the Files app and tap the TXT file to view it in Notes or another text editor app.
Full iOS guide

Android

  1. Use a file manager to locate the TXT file and open it with a text editor app like Jota Text Editor.
Full Android guide

Security notes

  • Be cautious of TXT files containing suspicious links or commands.
  • Avoid executing any shell commands copied from a TXT file without verifying their safety.
  • TXT files can be used to store scripts or batch files; ensure they are from a trusted source before running.

Recommended antivirus software

Scan files before opening them. These antivirus tools help protect against malware and viruses.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

Can't open this file?

These are the most common causes and fixes when .TXT files fail to open.

Common reasons

  • Unreadable characters
  • Line ending issues

Fix steps

  1. Try opening the file with different encodings like UTF-8 or ISO-8859-1.
  2. Consult the file's source to determine the correct encoding.

Convert .TXT to other formats

Use conversion tools to change .TXT files into formats your software supports.

What is a .TXT file?

A TXT file is a standard text document that contains unformatted text. It uses simple character encoding such as UTF-8 or ASCII, making it widely compatible across different platforms.

Background

TXT files have been a staple in computing since the early days due to their simplicity and universal compatibility. They are used for a variety of purposes, including storing configuration settings, writing notes, and sharing information that doesn't require formatting. The lack of formatting makes TXT files lightweight and easy to process by both humans and machines. Despite their simplicity, TXT files can be used in complex applications like programming, where they serve as source code files or logs. The format's straightforward nature ensures that TXT files remain relevant in a wide range of technical and non-technical fields.

Common MIME types: text/plain

Known aliases: .text

Further reading

Authoritative resources for more details on the .TXT format.

Common .TXT issues

Unreadable characters

The file may display garbled text due to an encoding mismatch.

  1. Try opening the file with different encodings like UTF-8 or ISO-8859-1.
  2. Consult the file's source to determine the correct encoding.

Line ending issues

Different operating systems use different line-ending characters, which can affect how text is displayed.

  1. Use a text editor that supports line-ending conversion, like Notepad++.
  2. Convert line endings to the appropriate format for your OS (e.g., CRLF for Windows, LF for Unix).

FAQ

Can TXT files store images or formatted text?

No, TXT files are limited to plain text. For formatted content, use formats like DOCX or HTML.

What is the best encoding for a TXT file?

UTF-8 is recommended for its wide compatibility and ability to represent a large set of characters.

How can I convert a TXT file to another format?

Use a word processor or text editor to open the TXT file, then save it as the desired format, such as DOCX or PDF.

Similar file extensions

Compare related formats in the same category to find the right tool faster.