Open .txt Files Online
What is this file?
A TXT file is the simplest file format there is: plain text with no formatting, fonts or layout — just characters. Notes, read-me files, server logs (.log), configuration files and most source code (.js, .py, .css, .html) are all plain text underneath. You usually receive one as an email attachment, a download from a device or program, or an export from an app. Plain text should open anywhere, yet it still trips people up: phones without a text editor, work computers where everything is locked down, or a file with an odd extension like .log or .dat that no app claims. Because there is no formatting to preserve, a text file is also the safest kind of file to peek into when you are not sure what you were sent.
How to open .txt files on Windows
Windows ships with Notepad, which opens .txt and .log files with a double-click. For code files and large logs, free editors such as Notepad++ or Visual Studio Code add syntax highlighting and handle multi-megabyte files without freezing. If a file has a strange extension but you suspect it is text, open Notepad first and drag the file in — if it is text, it will read fine. And if you are on a computer where you cannot install anything, the viewer on this page opens text files right in the browser tab.
How to open .txt files on Mac
macOS includes TextEdit, which opens plain text by default (check that it is in plain-text mode under Format if a file looks oddly styled). The built-in Terminal also offers quick peeks with the less or cat commands, and free editors like Visual Studio Code or BBEdit are popular for code and logs. Preview in Finder shows the first part of many text files with a press of the space bar. On a borrowed Mac with no setup time, this page reads the file in Safari or Chrome without changing the machine.
How to open .txt files on Android
Most Android phones open .txt files with a built-in viewer in the Files app or Google Drive's preview, and Google Docs can open text files too. For logs and code, free apps such as QuickEdit give you search and line numbers. If a file arrived in a chat app and nothing claims it, save it to Downloads first, then try opening it. Or skip the app hunt entirely: this viewer runs in Chrome on Android and shows the text locally, straight from your storage.
How to open .txt files on iPhone
On iPhone, the Files app previews .txt files with a tap, and the Notes app can import text. Textastic and other editor apps exist for code, but for simply reading a note, a log or a data export they are usually overkill. Attachments in Mail preview directly as well. If the file sits in iCloud or was shared to you without an obvious 'open with', this page opens it in Safari — the file is read on your phone and never uploaded anywhere.
Open it right here
Drop a file here, click to choose, or paste a link below
If the file still won't open
Garbled characters are the classic text-file problem: the file was probably saved in a different encoding (for example UTF-8 versus Windows-1252 or GBK), so accents and non-English text turn into symbols. A proper editor can re-open it with the right encoding. If the file shows one endless line, it uses different line endings — most modern viewers handle that automatically. A completely unreadable file with random-looking characters is likely not text at all, but a binary file with a .txt name by mistake; check its real size and source. Password protection does not exist for plain .txt itself, and files over 100 MB are beyond this page's in-browser limit — use a desktop editor for huge logs.
Private by design
Your text file is read entirely inside your browser with JavaScript and is never uploaded to a server — handy when a log or export contains names, addresses or other personal data. There is no account, and once this page has loaded, opening local files even works offline.
Plain Text vs Rich Text: Why Extension Renaming Breaks Code
Unlike rich text formats like DOCX or RTF that bundle fonts, styles, and XML metadata, plain text stores purely unadorned character bytes. That simplicity makes .txt, system .log files, and source code (.js, .py, .html) universally readable, but it also creates confusion. A common pitfall is editing code or structured data in standard word processors: programs like TextEdit or Word secretly substitute straight quotes with typographic curly quotes, inject invisible formatting markers, or append hidden extensions, immediately breaking Python scripts or JSON parsers. Similarly, simply renaming a .txt file to .csv or .html changes how the operating system associates the file, yet it never creates true tabular columns or functional markup tags on its own. While an in-browser preview is ideal for quick, safe inspection of scripts, notes, or configuration dumps, viewing alone cannot execute code, resolve compiler errors, or trace runtime bugs: these tasks require an IDE or terminal. Furthermore, browser viewing operates under honest technical boundaries: previewing is strictly read-only, password-protected files cannot open, and files exceeding 100 MB are not previewed due to browser memory constraints. For massive production server logs, dedicated command-line utilities or specialized log viewers remain the right tools.
Frequently asked questions
Is it free to open TXT files here?
Yes, completely free, with no account and no limits on how many files you view. The viewer runs in your browser, so there is no upload step and nothing to install.
Is my file uploaded to your server?
No. The file is read locally on your device with JavaScript. You can verify this in your browser's network panel: opening a local file makes no upload requests.
Which browsers and devices are supported?
Any modern browser — Chrome, Firefox, Safari and Edge — on Windows, Mac, Linux, Android and iPhone. If the browser can open this page, it can show your text file.
Can it open .log and code files, not just .txt?
Yes. Logs and source code are plain text, so .log, .js, .py, .css, .html, .xml, .yml and similar files all open here and are shown as-is in a monospace view.
Why does my file show strange symbols instead of letters?
That is an encoding mismatch: the file was saved in one character encoding and read as another. Try a desktop editor that lets you pick the encoding (UTF-8 is the usual first choice). The content itself is rarely lost.