A config file is a plain text document that tells a program how to behave when it starts up

Instead of asking you questions every time you open a program, most software reads a config file first. That file contains settings — like what language to display, where to save documents, what server to connect to, or how many recent files to remember. The program looks for this file, reads the values inside, and applies them automatically. If the file doesn't exist, the program uses built-in defaults instead.

Config files are almost always plain text, which means you can open them in Notepad or any basic text editor. They're not Word documents or PDFs — just lines of text with a specific format that the program knows how to read. This simplicity is intentional: it makes config files portable, straightforward to back up, and possible to edit by hand if something goes wrong.

You've probably already used config files without realizing it. When you set your email client to check mail every five minutes, or tell your web browser to remember passwords, or configure a game to run in fullscreen mode — those settings are usually stored in a config file somewhere on your computer.

Key Takeaways

  • A config file is a plain text document that stores settings a program needs when it starts, so you don't have to enter them manually each time.
  • Config files use specific formats — common ones include .ini, .conf, .yaml, and .json — and the program knows how to read its own format.
  • You can edit a config file with any text editor, but changing the wrong value or breaking the format will cause the program to either ignore the file or fail to start.
  • Different programs store config files in different locations: Windows often uses AppData folders, Mac uses Library folders, and Linux uses hidden folders in your home directory.
  • Backing up your config file before making changes protects you if something goes wrong, and lets you transfer settings to another computer running the same program.

Where config files live on your computer

Config files are usually hidden by default because they're not meant for everyday clicking around. On Windows, they often live in a folder called AppData inside your user folder — the full path might look like C:\Users\YourName\AppData\Roaming\ProgramName. You have to turn on "Show hidden files" in File Explorer to see them, because Windows hides the AppData folder by default.

On a Mac, config files typically live in a Library folder inside your home directory, at a path like ~/Library/process Support/ProgramName. Again, the Library folder is hidden by default. You can navigate there by opening Finder, pressing Command+Shift+G, and typing the path directly.

On Linux, config files are usually in a hidden folder (any folder starting with a dot) in your home directory, like ~/.config/programname or ~/.programname. Linux users are more accustomed to editing config files directly, so they're less aggressively hidden than on Windows or Mac.

The exact location varies wildly by program. Some applications store their config in the same folder as the program itself. Others use a standard location. The best way to find a specific program's config file is to search the program's documentation or search your file system for the program name plus "config".

Common config file formats and what they look like

Config files use different formats depending on what the program was designed to read. The most common formats are .ini (older Windows programs), .conf (Linux and server software), .yaml (modern applications), and .json (web-based and newer tools). Each format has its own rules about how to write settings.

An .ini file looks like this:

[Settings] language=English theme=dark window_width=1024 window_height=768 [Network] server=mail.example.com port=587

A .yaml file looks different — it uses indentation instead of brackets:

settings:   language: English   theme: dark   window_width: 1024   window_height: 768 network:   server: mail.example.com   port: 587

The format matters because the program expects a specific structure. If you edit a .yaml file and mess up the indentation, the program won't be able to read it. If you edit an .ini file and remove a bracket, the same thing happens. This is why it's important to back up a config file before you change it — if you break the format, you can restore the original and try again.

Why you might need to edit a config file yourself

Most of the time, a program's settings menu handles everything, and you never touch the config file directly. But sometimes you need to edit it by hand. Maybe the program doesn't have a settings menu for a particular option. Maybe you're moving the program to a new computer and want to copy your settings over. Maybe something is broken and you need to reset a value that the settings menu won't let you change.

Advanced users and system administrators edit config files constantly — it's often faster than clicking through menus, and it lets you change many settings at once. If you're setting up a server or installing software on multiple computers, editing config files in bulk is standard practice.

If you do edit a config file, always make a copy first. Open the file in a plain text editor like Notepad (Windows), TextEdit in plain text mode (Mac), or nano (Linux). Change only the value you need to change, not the structure or format. Save the file, close it, and restart the program. If something breaks, you can restore your backup and try again.

The difference between config files and other settings storage

Some programs don't use config files at all. Instead, they store settings in a database, a registry (on Windows), or a cloud service. Windows itself stores many settings in the Registry, which is a binary database rather than a text file. Some modern applications store settings in the cloud so they sync across your devices.

Config files are popular because they're straightforward, portable, and human-readable. You can email a config file to someone else, paste it into version control software, or move it between computers. A Registry entry or a cloud database is harder to move around. This is why servers, development tools, and open-source software tend to use config files — they're the most flexible option.

If a program uses a config file, you can usually find it, read it, and understand what it does. If a program stores settings in a Registry or database, you're stuck using the program's own settings menu to change anything.

What happens if you delete or corrupt a config file

If you delete a config file, most programs will straightforward start up with their default settings the next time you open them. You'll lose your customizations, but the program will still work. Some programs will automatically recreate the config file with defaults when they start.

If you corrupt a config file — by breaking the format, removing a bracket, or typing invalid values — the program might refuse to start, or it might ignore the corrupted file and use defaults instead. The behavior depends on how carefully the program was written. Either way, the solution is the same: restore your backup or delete the file and let the program recreate it.

This is why backing up a config file before you edit it is a good habit. A straightforward copy-paste into a folder called "backups" takes five seconds and saves you from having to reconfigure everything if something goes wrong.

Frequently Asked Questions

Can I move a config file from one computer to another?

Usually yes, as long as both computers have the same program installed and the same operating system. Copy the config file to the same location on the new computer, and the program should read your old settings. This doesn't always work if the program stores file paths in the config — those paths might not exist on the new computer — but for most settings it's a quick way to transfer your preferences.

What if I can't find the config file for a program?

Search your file system for the program name plus "config" or "settings". Check the program's documentation or help menu — many programs tell you where they store their config. On Windows, make sure you've turned on "Show hidden files" in File Explorer, because many config folders are hidden. If the program stores settings in the Registry or cloud instead of a text file, you won't find a config file at all.

Is it safe to edit a config file?

It's safe if you're careful. Always back up the original file first. Open it in a plain text editor, not Word or another rich-text program. Change only what you need to change, and don't alter the file's format or structure. Save it, close it, and restart the program. If something breaks, restore your backup and try again.

Why do some programs hide their config files?

Config files are hidden because they're not meant for casual users. Accidentally editing or deleting a config file can break a program, so operating systems hide them to reduce the chance of accidental damage. Advanced users can turn on "Show hidden files" and work with them directly, but most people never need to.

Can I have multiple config files for the same program?

Some programs support multiple config files or let you specify which config file to use when you start them. This is common in development tools and servers, where you might want different settings for different projects or environments. Check the program's documentation to see if it supports this — most everyday applications use a single config file.