How to Save Files in Different Formats (.txt, .html, .csv)
Basics

How to Save Files in Different Formats (.txt, .html, .csv)

Notepad is one of the simplest text editors in Windows, but it’s surprisingly powerful when it comes to saving files in different formats. Most people only use it for .txt files, but Notepad can also create and edit other types of text-based files — including HTML, CSV, and more.

If you’ve ever wondered how to save files in formats other than .txt, or what each format actually means, this guide will walk you through everything step-by-step.

Why Save in Different Formats?

By default, Notepad saves files as plain text (.txt). However, you can manually choose other extensions based on your purpose.

Here’s why saving in different formats is helpful:

  • .TXT → For plain notes or general writing.
  • .HTML → For web pages or simple coding projects.
  • .CSV → For data that you want to open in Excel or Google Sheets.
  • .BAT / .INI / .LOG / .JS → For scripting, configuration, or logs.

This flexibility makes Notepad a useful lightweight tool for writers, students, developers, and data professionals alike.

The Default Format: .TXT Files

When you open Notepad and start typing, it automatically assumes you’re creating a text document.

To save it:

  1. Click File → Save As.
  2. In the Save as type dropdown, choose All Files.
  3. In the File name box, type your name followed by .txt (for example, notes.txt).
  4. Choose a location and click Save.

Pro Tip: If you don’t add “.txt” manually, Notepad will automatically add it for you.

.TXT files are universal — they can be opened on any device (Windows, Mac, Android, iOS) using any text editor.

How to Save as .HTML (for Web Pages)

Want to create a simple webpage? Notepad is actually one of the easiest ways to write basic HTML.

Steps to Save as HTML:

  1. Open Notepad.
  2. Type your HTML code, for example: <!DOCTYPE html> <html> <head> <title>My First Page</title> </head> <body> <h1>Welcome to My Website</h1> <p>This page was created using Notepad!</p> </body> </html>
  3. Click File → Save As.
  4. In Save as type, choose All Files.
  5. In File name, type index.html.
  6. Change Encoding to UTF-8 (to avoid text display issues).
  7. Click Save.

Now go to the folder, double-click index.html, and it will open in your default web browser! 🌍

Pro Tip:
If you plan to build small web projects, using Notepad++ can make it easier with color highlighting and live formatting.

How to Save as .CSV (Comma-Separated Values)

A CSV file is used for storing data in rows and columns — just like Excel — but in plain text format.

Example CSV content in Notepad:

Name, Age, Country
Ali, 25, Pakistan
John, 30, USA
Emma, 28, UK

💾 Steps to Save as CSV:

  1. Open Notepad.
  2. Type your data as shown above, separating each column with a comma.
  3. Click File → Save As.
  4. In File name, type data.csv.
  5. In Save as type, select All Files.
  6. Set Encoding to UTF-8 (especially if your data contains special characters).
  7. Click Save.

Now you can open data.csv in Microsoft Excel, Google Sheets, or LibreOffice Calc, and it will display in neat rows and columns automatically.

Tip: Always use commas (,) between columns and new lines between rows.

Understanding the “Save as Type” Option

When you open File → Save As, you’ll see the “Save as type” dropdown. By default, it says:

“Text Documents (*.txt)”

But if you change it to:

“All Files (.)”

…it allows you to save with any file extension.

For example:

  • index.html → Creates a web file.
  • data.csv → Creates a data file.
  • script.js → Creates a JavaScript file.
  • config.ini → Creates a configuration file.

Note: Always type the extension manually if you select “All Files.” Otherwise, Windows may add .txt automatically at the end (like index.html.txt).


How to View or Change File Extensions

Sometimes Windows hides file extensions, which can confuse new users.
To fix this:

On Windows 10 / 11:

  1. Open File Explorer.
  2. Go to the top View tab.
  3. Check the box labeled File name extensions.

Now you’ll see the full name like notes.txt or index.html — not just “notes” or “index”.

This is important when you’re saving files in custom formats.

Examples of Other File Formats You Can Create in Notepad

Besides .txt, .html, and .csv, here are more file types you can save directly from Notepad:

ExtensionPurposeExample File Name
.batBatch file (for command automation)backup.bat
.iniConfiguration settingsappsettings.ini
.logLog file (for recording system events)errors.log
.xmlStructured data storagedata.xml
.jsJavaScript script fileapp.js
.jsonData exchange format (used in APIs)users.json

Each of these formats uses plain text but has specific rules for structure.

Pro Tip: You can even use Notepad to write Python scripts — just save them as .py.

Common Mistakes When Saving Files in Different Formats

Here are a few things users often do wrong — and how to fix them:

IssueCauseSolution
File shows as index.html.txtForgot to choose “All Files”Re-save with All Files and proper extension.
File opens as plain text instead of browserSaved incorrectlyEnsure file type is .html and encoding is UTF-8.
Special characters not displaying properlyWrong encodingUse UTF-8 encoding during save.
Excel not recognizing CSV columnsUsed semicolons instead of commasUse commas (,) only, unless your region settings differ.

Changing File Encoding (Important Tip)

When saving files, you’ll see a dropdown called Encoding at the bottom of the Save window.
You can choose:

  • ANSI: Basic English characters (default for older systems).
  • UTF-8: Supports all languages and symbols.
  • Unicode: Similar to UTF-8, but uses more bytes.

For most modern tasks — especially .html, .csv, or .json — always select UTF-8.

This ensures your text displays correctly on all platforms.

Bonus: Open Different Formats in Notepad

You can open any plain-text-based file with Notepad, even if it’s not .txt.

For example, right-click any file → Open With → Notepad
You can view code, logs, and data from:

  • .html
  • .css
  • .xml
  • .ini
  • .json
  • .bat
  • .csv

This makes Notepad a great universal viewer for technical and non-technical users alike.

Final Thoughts

Notepad might seem basic, but it’s a hidden gem for quick file editing and creating multiple text-based file types.
By learning how to save files in different formats, you can:

  • Build basic web pages (.html)
  • Manage data for spreadsheets (.csv)
  • Write logs or configuration files (.log, .ini)
  • Keep clean text notes (.txt)

Once you get comfortable using the “Save As → All Files” method and setting proper encoding, you’ll find Notepad to be a simple yet versatile tool for almost any text-based task.

So next time you open Notepad, remember — it’s more than just a place for quick notes. It’s your lightweight workspace for HTML, CSV, and much more.

Leave a Reply

Your email address will not be published. Required fields are marked *