.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
- Right-click the file and select 'Open with', then choose Notepad or another text editor.
- Use Notepad++ or VS Code for more advanced editing features.
Mac
- Double-click the file to open it with TextEdit.
- For larger files or coding, use VS Code or Sublime Text.
Linux
- Double-click the file to open with the default text editor like gedit or Kate.
- Use terminal commands like 'nano filename.txt' or 'vim filename.txt' for quick edits.
iOS
- Open the Files app and tap the TXT file to view it in Notes or another text editor app.
Android
- Use a file manager to locate the TXT file and open it with a text editor app like Jota Text Editor.
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.
Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.
NortonNorton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.
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
- Try opening the file with different encodings like UTF-8 or ISO-8859-1.
- Consult the file's source to determine the correct encoding.
OS-specific troubleshooting
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.
- Try opening the file with different encodings like UTF-8 or ISO-8859-1.
- 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.
- Use a text editor that supports line-ending conversion, like Notepad++.
- 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.