How to Make a Text File on Any Device or Operating System

Text files are among the most fundamental file types in computing. Whether you're jotting down notes, writing a script, storing configuration data, or preparing content for a developer, knowing how to create a text file is a surprisingly versatile skill — and the method varies more than most people expect.

What Is a Text File?

A text file is a document that stores plain, unformatted characters — letters, numbers, symbols, and line breaks — with no embedded styling, fonts, or images. It's typically saved with a .txt extension, though other plain-text formats like .csv, .log, .md, and .json are also technically text files depending on their content.

Unlike Word documents (.docx) or rich text files (.rtf), text files contain no formatting metadata. What you type is exactly what's stored. This makes them lightweight, universally readable, and compatible with virtually every operating system and application.

How to Make a Text File on Windows

The most direct route on Windows is Notepad, which has shipped with every version of Windows for decades.

Using Notepad:

  1. Press Windows + S and type Notepad, then hit Enter
  2. A blank document opens immediately
  3. Type your content
  4. Press Ctrl + S to save
  5. Choose a folder, name the file, and confirm the file type is .txt

Using File Explorer (right-click method):

  1. Navigate to any folder
  2. Right-click on empty space
  3. Select New → Text Document
  4. Name the file and press Enter

This creates an empty .txt file instantly, which you can then open and edit in Notepad or any other text editor.

Other Windows text editors worth knowing: WordPad (richer formatting but still saves plain text if you choose .txt), Notepad++ (a popular free editor for developers), and VS Code (common for coding and markdown work).

How to Make a Text File on macOS 🍎

macOS doesn't default to saving plain text in the same intuitive way, because TextEdit — the built-in text editor — opens in Rich Text Format (RTF) by default.

To create a true plain-text .txt file in TextEdit:

  1. Open TextEdit
  2. Go to Format → Make Plain Text (or press Shift + Command + T)
  3. Type your content
  4. Save with Command + S
  5. Ensure the filename ends in .txt and uncheck "If no extension is provided, use .rtf" if prompted

Alternatively, change TextEdit's default behavior permanently: go to TextEdit → Preferences → Format and select Plain Text.

Terminal method (for comfort with command line):

touch myfile.txt 

This command creates an empty text file in your current directory instantly.

How to Make a Text File on Linux

Linux users have the widest range of options, from graphical text editors to terminal commands.

Common graphical editors by desktop environment:

  • GNOME: gedit (Text Editor)
  • KDE: Kate or KWrite
  • Xfce: Mousepad

Terminal methods:

touch filename.txt # creates an empty file nano filename.txt # opens nano editor to write and save echo "your text" > file.txt # writes a single line directly 

Linux treats text files as first-class citizens — configuration files, shell scripts, and system logs are all plain text under the hood.

How to Make a Text File on a Phone or Tablet 📱

Mobile operating systems handle text files differently since they're not built around a traditional file system in the same way.

On Android:

  • Apps like Simple Notes, Markor, or QuickEdit can create and save .txt files directly to local storage or cloud services
  • Some file manager apps (e.g., Files by Google) include a basic text file creator under their "Create" options

On iPhone/iPad:

  • The built-in Files app doesn't create text files natively
  • Third-party apps like Textastic, iA Writer, or Pretext can create and save plain-text .txt files to iCloud Drive or other locations
  • Some users use the Shortcuts app to automate text file creation

The mobile experience is noticeably less straightforward than desktop, which is worth factoring in if you need to create or edit text files regularly on a phone.

Text File Encoding: A Variable That Matters

When you save a text file, it's encoded in a specific character format. The most common are:

EncodingWhat It SupportsCommon Use
UTF-8Nearly all characters globallyWeb, development, universal default
UTF-16Broader Unicode rangeSome Windows apps, multilingual content
ASCIIBasic English characters onlyLegacy systems, simple scripts
ANSI/Windows-1252Western European charactersOlder Windows documents

Most modern editors default to UTF-8, which is the right choice for nearly all general purposes. Encoding mismatches — saving in one format and opening in another — can cause garbled characters, especially with non-English text or special symbols. If you're creating text files for a specific system, application, or developer workflow, confirming the expected encoding before saving is worth the extra step.

When Plain Text Isn't Quite Right

Text files are powerful in their simplicity, but they have real limits. They don't support:

  • Bold, italic, or font styling
  • Images or tables (without a markup language like Markdown or HTML)
  • Multiple pages or document structure (beyond line breaks)

If your use case requires any of those, you're likely looking at a different file format — Markdown (.md), HTML, or a word-processor format depending on the destination.

The "right" way to create and use a text file depends heavily on your operating system, your preferred tools, what the file will be used for, and whether it needs to integrate with other systems or applications. Those specifics are what ultimately shape which method works best for any given situation.