A .ini file stores settings for a program in plain text
A .ini file is a simple text file that holds configuration settings for software. When you open a program and adjust things like window size, color scheme, or default folders, that program often saves those choices in a .ini file so it remembers them the next time you launch it. The name comes from "initialization" — the file initializes the program with your preferences instead of starting from scratch every time.
These files are human-readable, meaning you can open one in Notepad and actually understand what you're looking at. You'll see settings organized into sections marked with brackets, like [Settings] or [Display], followed by lines that say things like theme=dark or window_width=1024. This simplicity is why .ini files have been around since the early days of Windows and why some programs still use them today.
Most of the time you never need to touch a .ini file directly. The program's own settings menu handles everything. But sometimes a setting doesn't have a menu option, or you need to fix a corrupted file, or you're moving settings from one computer to another — that's when knowing what a .ini file is becomes useful.
Key Takeaways
- .ini files store program settings in plain text format organized into labeled sections, and programs read them when they start up.
- You can open and edit a .ini file with Notepad, but only if you know exactly what you're changing and why.
- Windows stores many .ini files in hidden folders, so you may need to show hidden files to find them.
- Backing up a .ini file before editing it protects you if a change breaks the program.
- Modern programs increasingly use other formats like .json or registry entries instead of .ini files, but many older and simpler programs still rely on them.
Where .ini files live on your computer
On Windows, .ini files are usually tucked away in folders you don't see by default. The most common location is C:\Users\[Your Username]\AppData\Local or C:\Users\[Your Username]\AppData\Roaming, followed by the program's folder name. For example, a program called "PhotoEdit" might store its settings at C:\Users\[Your Username]\AppData\Roaming\PhotoEdit\settings.ini.
The AppData folder is hidden by default, so you won't find it by browsing normally. To see it, open File Explorer, click the View tab at the top, and check the box that says "Hidden items." After that, you can navigate to AppData and look for your program's folder. Some older programs store .ini files directly in their installation folder, usually under C:\Program Files or C:\Program Files (x86).
On Mac and Linux, configuration files exist but usually have different names and formats — often starting with a dot like .config or .conf — so the .ini format is primarily a Windows thing, though some cross-platform programs use it on all systems.
How to safely edit a .ini file
Before you open a .ini file to make changes, close the program that uses it. If the program is running, it may overwrite your edits or cause the file to become corrupted. Once the program is shut down, right-click the .ini file, select "Open with," and choose Notepad.
Inside the file, you'll see sections in square brackets and settings below them. Each setting is usually formatted as name=value. For example, you might see [Window] followed by width=800 and height=600. Change only the values you intend to change, and do not alter the section names or the structure of the file. A single misplaced character can break the whole thing.
After you make your changes, save the file (Ctrl+S in Notepad), close it, and then launch the program. If something goes wrong and the program won't start or behaves strangely, close it, delete the .ini file, and relaunch the program — it will usually create a fresh .ini file with default settings.
The safest approach is to make a copy of the .ini file before editing it. Right-click the file, select "Copy," then right-click in the same folder and select "Paste." Rename the copy to something like settings_backup.ini. If your edit breaks things, you can delete the broken file and rename the backup back to the original name.
Why programs still use .ini files
Modern programs often store settings in other formats — JSON files, XML, or Windows Registry entries — because those formats can handle more complex data. But .ini files persist because they're simple, lightweight, and don't require any special tools to read or edit. A small utility or older software may use a .ini file because it's straightforward to code and takes up almost no disk space.
Portable programs — ones you can run from a USB drive without installing them — often use .ini files because they can store settings right next to the program itself, making it easy to move everything together. Games sometimes use .ini files for graphics and gameplay settings, especially indie games or older titles. And some system utilities still rely on them because the format has been reliable for decades.
The downside is that .ini files can't store certain types of data well, and they're not encrypted, so anyone who can access the file can read your settings. That's why modern programs that handle sensitive information use more secure storage methods.
Common mistakes when editing .ini files
The most frequent error is changing a value to something the program doesn't expect. For instance, if a setting says theme=light and you change it to theme=bright, the program may not recognize "bright" as a valid option and either ignore the setting or crash. Always check the program's documentation or comments within the .ini file itself — many .ini files include notes explaining what values are acceptable.
Another mistake is accidentally deleting a section header or adding extra spaces where they don't belong. The format is strict: [SectionName] must be exactly as written, with no extra spaces inside the brackets. If you delete a bracket or add a space, the program won't find that section and will use default values instead.
Editing a .ini file while the program is running is also risky. The program may be actively reading or writing to the file, so your changes could be overwritten or the file could become corrupted. Always close the program first, make your edits, save, and then reopen the program.
When you might need to edit a .ini file
You might edit a .ini file if a program's settings menu is missing an option you need to change. Some developers include advanced settings in the .ini file that aren't exposed in the user interface. You could also need to edit one if you're transferring settings from one computer to another — copy the .ini file to the same location on the new computer, and the program will load your old preferences.
If a program crashes on startup or behaves erratically, a corrupted .ini file might be the cause. Deleting it and letting the program create a fresh one often solves the problem. And if you're troubleshooting an issue with technical support, they may ask you to send them your .ini file so they can see what settings you're using.
In rare cases, malware or a failed update can corrupt a .ini file. If you suspect this, restore it from your backup or delete it and let the program regenerate it with defaults.
Frequently Asked Questions
Can I delete a .ini file?
Yes. When you delete a .ini file and restart the program, it will create a new one with default settings. This is actually a useful troubleshooting step if the file becomes corrupted. Just be aware that you'll lose any customizations you made — window positions, color choices, and other preferences will reset.
What's the difference between a .ini file and a .cfg file?
.cfg stands for "configuration" and serves the same purpose as a .ini file — both store program settings in plain text. The difference is mainly historical and naming convention. Some programs use .cfg, others use .ini, and some use both. They work the same way and can be edited with Notepad.
Why can't I find my program's .ini file?
It's probably in a hidden folder. Make sure you've turned on "Show hidden files" in File Explorer's View menu. Also check the program's installation folder directly — some programs store .ini files there instead of in AppData. If you still can't find it, the program may be using a different storage method, like the Windows Registry or a .json file.
Is it safe to edit a .ini file if I don't know what I'm doing?
Only if you make a backup first. Copy the .ini file before you touch it, then make small changes one at a time and test the program after each change. That way, if something breaks, you can restore the backup. Never edit a .ini file based on guesswork — look up what each setting does first.
Do Mac and Linux programs use .ini files?
Some do, especially cross-platform programs that run on Windows, Mac, and Linux. But Mac and Linux programs more commonly use formats like .plist (Mac) or .conf files (Linux). If you're on Mac or Linux and a program mentions a .ini file, it's usually because the program was originally designed for Windows.