TXT file maker: turn any text into a .txt file in one click
To convert text to TXT, type or paste it into the box above and press Save as TXT. The text is downloaded straight away as a .txt file, so you can turn a copied message, note or paragraph into a TXT file without installing anything. If you leave the file name empty, the first line becomes the name. The default encoding is UTF-8 with a BOM, which Notepad and Excel open correctly. On a keyboard, Ctrl+S (⌘+S on a Mac) saves too.
You can also open an existing TXT file, edit it and save it again, or switch its encoding and line endings. Files written by older programs in Windows-1252 (often called ANSI) are detected and shown without garbled letters. Everything happens in your browser; the text is not sent to a server.
Because it runs in the browser, this text file generator also works on devices that have no Notepad. On an Android phone, an iPhone or iPad, or a Chromebook, paste the text and tap or click Save as TXT: the file lands in Downloads or the Files app, ready to attach to an email or upload.
When a TXT file is the right choice
A TXT file holds characters only: no fonts, colors, tables or images. That makes it the simplest document there is, readable by the default text app on a computer, phone or tablet, and much smaller than the same words in a Word document.
- Sending a phone note as a file: paste a chat message or a note into the box, save it as .txt and attach the file to an email or upload it to cloud storage.
- Keeping only the plain text: text copied from a web page often carries bold, links and other formatting. Pasting it here and saving as TXT keeps just the plain text.
- Feeding a program that wants a .txt file: word lists, scripts, config files and upload forms often accept only TXT, sometimes with a specific encoding or line ending, and you can pick both before you save.
How a TXT file is made
- Characters become bytes: a file is just a row of numbers from 0 to 255 (bytes), and the encoding is the rule that maps each character to bytes. In UTF-8, an English letter takes 1 byte and a letter such as é takes 2.
- A BOM is added or not: the BOM is a short marker at the very start of the file. In UTF-8 it is the three bytes EF BB BF, and in UTF-16 LE it is FF FE. Some programs only recognize a file as UTF-8 when the marker is there.
- Line endings are chosen: LF writes 0A (1 byte) at each line break and CRLF writes 0D 0A (2 bytes). CRLF is the traditional Windows style; Mac and Linux use LF.
- The file name is cleaned up: the characters < > : " / \ | ? * are not allowed in Windows file names and become _, and trailing periods and spaces are removed. Reserved names such as CON, PRN, AUX, NUL, COM1 to COM9 and LPT1 to LPT9 get a _ in front.
The first bytes strip in the converter above shows exactly what the start of your file will contain. The BOM is highlighted in orange, CR with a dotted box and LF with an underline.
Basis Byte values for the encodings follow the Unicode Consortium FAQ, file name rules follow Microsoft Learn, and the legacy encodings that can be opened follow the WHATWG Encoding Standard. The table below was calculated with this tool on 13 October 2026.
How encoding and line endings change the file size
The same text gives a different size in bytes depending on the encoding and the line ending. These are the sizes this tool produces.
| Text | UTF-8 BOM · LF | UTF-8 · LF | UTF-8 · CRLF | UTF-16 LE · LF |
|---|---|---|---|---|
| Hello | 8 | 5 | 5 | 12 |
| Café | 8 | 5 | 5 | 10 |
| Hello + line break + world | 14 | 11 | 12 | 24 |
| Milk / Eggs / Bread (3 lines) | 18 | 15 | 17 | 32 |
For English text UTF-8 is the smallest, because UTF-16 LE spends 2 bytes on every character plus its own 2-byte marker. Accented letters such as the é in Café cost 2 bytes in UTF-8, still less than UTF-16 for mostly Latin text. The BOM adds only 3 bytes, so choose by the program that will open the file rather than by size.
| If the file will be used for | Encoding | Line endings |
|---|---|---|
| Opening in Windows Notepad or Excel, or sending to someone else | UTF-8 BOM | LF or CRLF |
| Code, config files, web servers, Mac or Linux programs | UTF-8 (no BOM) | LF |
| An older Windows program that only splits lines on CRLF | UTF-8 BOM | CRLF |
| A program that asks for a "Unicode" text file | UTF-16 LE | CRLF |
Common mistakes
- Typing .txt in the file name: the .txt ending is already added after the name box. If you type "report.txt" the file is still saved as one report.txt, so you only ever need the name itself.
- Strange characters in Notepad: when the encoding used to save differs from the one used to open, letters turn into "�" or odd symbols like "é". Saving as UTF-8 BOM is the safe choice for Notepad and Excel.
- An invisible character at the start: some programs do not expect a BOM and read it as an extra character before the first letter. For code, config files and CSV headers choose UTF-8 without BOM.
- Expecting formatting to survive: a TXT file cannot store bold, colors, tables or images. If you need them, save a document file instead.
- Not finding the file on a phone: downloads usually land in the Downloads folder or the Downloads section of the Files app. Some browsers ask where to save each file.
Limits and cautions
- You can save as UTF-8 BOM, UTF-8 or UTF-16 LE. Browsers' TextEncoder only produces UTF-8, so there is no option to save as Windows-1252 (ANSI), EUC-KR or Shift_JIS. Those files can be opened but not written.
- Files you open must be TXT files of 10 MB or less. Very long text can make the character count update a little late.
- Autosave stays only in this browser on this device. It is not shared with other devices and can disappear if you clear browser data or close a private window. Save important text as a TXT file.
- Words are groups of characters separated by spaces. Characters are counted as you see them, so one emoji counts as 1.
- Very long text may not fit in the browser storage used for autosave. If that happens you will see a warning, so save it as a TXT file.
Sources
- 01Unicode Consortium: UTF-8, UTF-16, UTF-32 & BOMUTF-8 BOM is EF BB BF and UTF-16 LE BOM is FF FE; some recipients of UTF-8 encoded data do not expect a BOM
- 02Microsoft Learn: Naming Files, Paths, and NamespacesReserved characters < > : " / \ | ? *, reserved names CON, PRN, AUX, NUL, COM1-9 and LPT1-9 (also with an extension), no trailing space or period
- 03WHATWG Encoding StandardLegacy encoding labels euc-kr, shift_jis and windows-1252; TextEncoder supports UTF-8 only
- 04RFC 5198: Unicode Format for Network InterchangeFor Unicode text exchanged over a network, the line ending is CRLF (CR U+000D followed by LF U+000A)
Frequently asked questions
How do I convert text to a TXT file?
Type or paste your text into the box above and press Save as TXT. The text downloads right away as a .txt file. If you leave the file name empty, the first line becomes the name, and if there is no first line the date is used. It works the same way on a phone.
How do I create a .txt file on my phone or Chromebook?
Phones and Chromebooks don't have Windows Notepad, but this page works in their browsers. Paste or type the text and tap or click Save as TXT. The file goes to your browser's download location, usually the Downloads folder or the Downloads section of the Files app. Some browsers ask where to save it.
Can it convert Word or PDF files to TXT?
This TXT converter does not open Word (.docx) or PDF files directly. Open the document, select the text, copy it, paste it into the box above and click Save as TXT: you get a plain .txt file with the words only, while fonts, tables and images are left out. A scanned PDF that is only an image has no text to copy, so it needs a text-recognition tool first.
Which encoding should I choose for a TXT file?
Keep UTF-8 BOM, the default, for files you will open in Notepad or Excel or send to other people. Choose UTF-8 (no BOM) for code, config files and the web. UTF-16 LE is only for programs that ask for a Unicode text file.
What is a BOM and do I need one?
A BOM is a short marker at the very start of a file. In UTF-8 it is the three bytes EF BB BF. Programs such as Notepad and Excel can use it to recognize UTF-8, but some recipients of UTF-8 data do not expect a BOM and may read it as an extra character before the first letter. For code, config files and CSV headers pick UTF-8 (no BOM).
Why does my text look garbled in Notepad?
The encoding used when saving differs from the one used when opening, so letters turn into � or symbols like é. Save as UTF-8 BOM for Notepad and Excel. If an older file in Windows-1252 (ANSI) already looks wrong, open it here: it is detected automatically and you can save it again as UTF-8.
What is the difference between LF and CRLF line endings?
LF writes the single byte 0A at each line break and CRLF writes the two bytes 0D 0A. Mac, Linux and the web use LF, while some older Windows programs only split lines on CRLF. The first bytes strip in the converter shows the difference.
Is my text uploaded anywhere?
No. Counting and building the file all happen in your browser, and nothing is sent to a server. If autosave is on, a copy stays in this browser on this device, so turn it off on a shared computer. Turning it off also removes the saved copy.