Skip to main content

How to create a text file on Windows 11 and 10

Just need a .txt file? Create one online in seconds →

Right-click an empty spot on the desktop or in File Explorer and choose New › Text Document. Type a name and press Enter. If Text Document is missing, open Notepad and save your text as .txt instead.

Method 1: Right-click › New › Text Document

1. Choose a folder

Open File Explorer with Windows + E and go to the folder where you want the file. Documents is a convenient place for something you want to keep. You can also use the desktop if you need to find or attach it right away.

2. Create the document

Right-click a blank area of the folder or desktop. Hover over New, then select Text Document. If you right-click an existing document, Windows shows actions for that item, so move the pointer away from any icons and try again.

3. Name and edit the file

Type a name such as meeting-notes and press Enter. Windows adds .txt. If the extension is visible while you rename the file, leave it at the end. Double-click the document to open it, enter your text, and press Ctrl + S. If another editor opens, right-click the file and choose Open with › Notepad.

Check the file extension

Windows can hide extensions for familiar file types. In Windows 11, turn them on in File Explorer with View › Show › File name extensions. In Windows 10, use the View tab and check File name extensions. Now you can distinguish notes.txt from notes.txt.txt and see the real ending of a filename someone sent you.

Method 2: Save a file in Notepad

  1. Open Start, search for Notepad, and launch the app.
  2. Type or paste your text. If you copied it from a formatted document, review any headings, lists, or table columns you want readers to understand as plain text.
  3. Press Ctrl + S to save a new document. For an existing document you want to preserve, choose File › Save As to save a separate copy.
  4. Select a folder, enter a filename such as meeting-notes.txt, and choose Text documents (*.txt) under Save as type if the picker asks. Choose UTF-8 under Encoding for text with accented letters, Chinese characters, or emoji, then save.

Use this method when you already have text ready to paste or want to write before choosing the destination. After saving, look in the selected folder and reopen the file. This confirms you saved a file on disk, especially if Notepad has kept an unsaved tab open across restarts.

Method 3: Use Command Prompt or PowerShell

  1. Open the shell you intend to use. These examples write to the shell's current folder, so start from a writable folder and choose a filename you can safely use.
  2. In Command Prompt, run type nul > notes.txt for an empty file or echo Hello> notes.txt for a file with one line. In this shell, > sends the output to the file and replaces its existing contents.
  3. In PowerShell, run New-Item -Path notes.txt -ItemType File to make an empty file. To write a line, use Set-Content -Path notes.txt -Value "Hello" -Encoding UTF8. The second command can create the file directly and replaces any text already there.

The commands use a simple ASCII word so it survives older tools' encoding defaults. For a longer text with multiple languages, use Notepad or specify an encoding in PowerShell. Windows PowerShell and newer PowerShell releases differ in whether their UTF-8 option adds a byte order mark. Choose the format required by the program that will read the file. Microsoft's New-Item reference, Set-Content reference, Command Prompt redirection reference

Method 4: Create it online

  1. Open the editor on this page and type or paste your text.
  2. Enter a filename and pick UTF-8 unless you have a specific encoding requirement. Choose LF or CRLF under Line endings if the file must match another application.
  3. Download the file, then find it in your browser's downloads or the folder you selected.

Why is New › Text Document missing in Windows 11?

First right-click the background inside a normal folder, such as Documents, to see whether the option is available there. Try Show more options on the Windows 11 context menu if you only see the compact menu. Shift + F10 also opens a context menu for the current selection, so check what has focus before using it.

If you recently removed Notepad, look up Windows Notepad in the Microsoft Store and reinstall it if your Windows version supports it. The New menu can vary by machine and policy. If your work PC restricts Store installs or the entry is still absent, save from Notepad if available, or use PowerShell or the browser editor above. You only need permission to write to the destination folder.

How do I change a file into a .txt file?

If the file already contains plain text, such as a log with a .log extension, turn on extensions and rename a copy so it ends in .txt. Changing the name leaves its bytes and encoding intact. If the file is a Word document or another formatted file, open it in the program that understands it and export as plain text, or copy the text you want into Notepad and save it. Review the resulting file for anything the original displayed in images or tables.

FAQ

Why did Windows add .txt twice?

The file likely already had an extension hidden from view. Show extensions and remove the duplicate ending. You should see a single .txt in the full name.

Can a TXT file be empty?

Yes. The right-click method creates a file before you type anything. The browser editor enables download once you enter content.

Should I use LF or CRLF on Windows?

Use what the receiving application expects. CRLF is common in Windows workflows, while LF is common in scripts that run on Linux or macOS. See how LF and CRLF differ and how to save a text file on Mac.

Sources

Create a text file online

Characters
0
Words
0
Lines
0
Bytes
0

Your text stays in your browser. Nothing is uploaded.