.txt Plain text files are simple files that only contain unformatted text (letters, numbers, symbols etc). They are not structured or machine-readable in any standardized way, and can be opened by any text editor.
Plain text files are commonly used for notes, documentation, logs, config instructions, and storing raw or unstructured text.
Hi there! My name is Grant. Welcome to my website!
Here you will learn all different kinds of things related to computers and programming. Take a look around and enjoy!
This file would be saved as introduction.txt.
.json JavaScript Object Notation (JSON) files are plain text files that store structured data using key-value pairs. The are human-readable and machine-parsable, and can be used with many programming languages.
JSON files are commonly used in APIs, configuration files, structured datasets, and web development.
{
"data": {
"name": "Grant Davis",
"address": "1285 Lyons Lane",
"city": "Erie",
"state": "Colorado",
"zip": "80516",
"phone": "7204002471",
"pets": [
{
"name": "Sadie",
"age": 7
},
{
"name": "Georgie",
"age": 3
}
]
}
}
This file would be saved as grants_info.json.
.csv Comma Separated Value (CSV) files are plain text files that store structured data in rows and columns. Values are separated by commas (known as a delimiter) and new records are created by newlines. Delimiters come in all different shapes and sizes, and include tabs, spaces, semicolons, and many different types of brackets. CSV files can be easily imported into spreadsheet software and databases.
CSV files are commonly used for data exchange (exports and imports) between systems, spreadsheet editing, data science and analytics, and database migrations or backups.
first_name,last_name,age
grant,davis,28
heidi,sibole,27
connor,davis,31
evan,davis,33
isaac,ireland,28
luke,mccarty,28
lake,michotte,28
This file would be saved as people.csv.
.env ENV files are plain text files that store environment variable definitions in a key-value format. Everything in an ENV file is stored as a string. Applications use ENV files to load configuration data at runtime (like API keys, database URLs, specific port numbers etc). ENV files are typically excluded from version control systems like Git by being listed in a .gitignore.
ENV files are used for configuration management, and storing secrets/credentials locally during development.
API_KEY="sk-r8T5mQ2dJzX1yHp9VgLf3eWc7nK0bUqP"
DATABASE_URL="postgresql://user_9xQ2:pA7fLgK3mZ@db.example.com:5432/mydatabase"
PORT="3000"
This file would be saved as .env.
require('dotenv').config();
console.log(process.env.API_KEY);
ENV files can only be used for backend services, not on the frontend. They need to be required and installed.
.yml .yaml YAML Ain't Markup Language (YAML) files are plain text files that store structured data using indentation. They are human-readable and machine-parsable, and support nesting, lists, and key-value pairs. They are strict and whitespace-sensitive, and are less compact than JSON files.
YAML files are commonly used as configuration files (like for Docker Compose, Kubernetes, GitHub Actions), CI/CD, and infrastructure as code.
app:
name: "StarTracker"
version: 1.2.5
debug: true
server:
host: "0.0.0.0"
port: 8080
ssl: { enabled: true, cert: "/etc/cert.pem", key: "/etc/key.pem" }
database:
engine: "postgresql"
host: "db.internal"
user: "star_admin"
pass: "S3cureP@ssw0rd"
features: [auth, logging, metrics, backup]
logging:
level: "INFO"
output: [stdout, "/var/log/app.log"]
This file would be saved as config.yaml.
.log Log files are plain text files that store timestamped structured event messages. They are append-only, meaning new entries are added to the end of the file and existing entries cannot be changed or deleted. Some log files embed structured data, such as JSON objects or CSV lines, within messages, making them easier to parse or analyze with other tools.
Log files are commonly used for recording application events, debugging, and auditing.
[2025-10-21 10:00:00] Server started
[2025-10-21 10:05:12] User logged in
[2025-10-21 10:10:32] Data updated
[2025-10-21 10:12:59] { "level": "error", "message": "Failed to connect", "code": 503 }
This file would be saved as 2025-10-21-133042.log.