Online Text File (TXT) Viewer and Editor
Read and edit plain text files in the browser, with search, line numbers and handy tools for lines and whitespace. Your file never leaves your device.
Turn on JavaScript to open your file. It is read in your browser and never uploaded.
How to open and edit a text file online
- Drop your .txt file on the page. Choose a text file, such as notes, a log or a list. It is read in your browser and never uploaded.
- Read it comfortably. Turn line numbers and wrapping on or off, pick a font and a size, and search the text (press / to jump to the search box).
- Switch to Edit. Type in the text box, or use the toolbar: change case, tidy spaces, sort, reverse or de-duplicate lines, indent, insert the date and time, and find and replace. With text selected, a tool works on the selection only.
- Choose the line endings. Pick LF (Unix, macOS) or CRLF (Windows) for the saved file. Without a choice, the file keeps the line endings it had.
- Download your text file. Use the download icon to save it. The original file on your device is never changed.
Text file viewer and editor: common questions
How do I change line endings (LF to CRLF) in a text file?
Open the file, switch to Edit, open the line endings menu in the toolbar and choose LF or CRLF. The download uses your choice; a file that already ends its lines that way is left as it is.
How do I sort lines or remove duplicate lines in a text file?
In Edit mode, open the lines menu and choose Sort A to Z, Sort Z to A, Reverse order or Remove duplicate lines. Select some lines first to change only those, or select nothing to change the whole text.
How do I change the case of text?
Use the case menu in the toolbar: UPPERCASE, lowercase, Capitalize Each Word or Sentence case, on the selected text or on the whole file.
Can I open text files with Arabic or other non-English characters?
Yes. UTF-8 (with or without a BOM) and UTF-16 files are read directly, and a file that is not valid UTF-8 is read as Windows-1256, the old Arabic encoding. Each line is shown in its own reading direction.
Can I open a large text or log file?
Yes. In View mode only the visible lines are drawn, so large files stay fast. Editing a very large file (over about 2 million characters) can feel slower, and line numbers are hidden while you edit it.
Does it keep my file's line endings and encoding?
Yes. Line endings stay as they were unless you choose others, and a file that started with a byte order mark keeps it. Saved text files are UTF-8.