What an INI file is and why you might need one

An INI file is a plain-text configuration file that stores settings for programs and systems. INI stands for "initialization," and these files tell software how to behave when it starts up — things like default colors, window size, user preferences, or connection details. You create and edit them with a basic text editor, the same way you would write a note.

Most people never need to create an INI file from scratch. Your software usually creates them automatically. But if you're troubleshooting a program, following specific setup instructions, or configuring older software, you may need to write one yourself or modify an existing one.

The structure is simple: settings are organized into sections (marked with square brackets), and each section contains key-value pairs separated by an equals sign. For example, a section called [Display] might contain width=1024 and height=768.

Key Takeaways

  • INI files are plain-text configuration files you can create and edit with Notepad (Windows) or TextEdit (Mac), not special software.
  • The structure uses section headers in square brackets followed by key=value pairs, with one setting per line.
  • You must save the file with the .ini extension and in the location the program expects, or the program won't read it.
  • Always back up the original INI file before editing it, so you can restore it if something breaks.
  • INI files are case-sensitive on Mac and Linux but not on Windows, so check your program's documentation for the correct capitalization.

Creating a new INI file on Windows

Open Notepad by pressing the Windows key, typing "notepad," and pressing Enter. You can also right-click on your desktop or in a folder, select "New," and choose "Text Document."

Type your configuration settings in the format the program expects. Start with a section header in square brackets, then add your settings below it. For example:

[Settings] username=john password=mypassword theme=dark [Display] resolution=1920x1080 refresh_rate=60

When you're done, click "File" and then "Save As." In the "Save as type" dropdown, select "All Files" instead of "Text Documents." Type your filename with the .ini extension — for example, config.ini or settings.ini. Choose the folder where the program expects to find it (check the program's documentation or settings folder). Click "Save."

Creating a new INI file on Mac

Open TextEdit, which is in your Applications folder under Utilities. Go to "Format" in the menu bar and select "Make Plain Text" — this is essential, because TextEdit defaults to rich text format, which will break your INI file.

Type your configuration in the same format as Windows: section headers in square brackets, then key=value pairs. Save the file by pressing Command+S. In the dialog that appears, type your filename with the .ini extension. Choose the location where the program expects the file (usually a hidden folder in your home directory or the program's own folder). Click "Save."

If you're saving to a hidden folder, you may need to press Command+Shift+Period (full stop) to show hidden files in the save dialog. Some programs store INI files in ~/Library/Preferences/ or ~/Library/Application Support/ — check the program's documentation.

Editing an existing INI file

Right-click the INI file and select "Open with" (Windows) or "Open With" (Mac). Choose Notepad, TextEdit, or another plain-text editor. Do not use Microsoft Word or Google Docs — they add formatting that will corrupt the file.

Make your changes carefully. Keep the section headers and key names exactly as they are — capitalization and spelling matter. Only change the values on the right side of the equals sign, unless you're following specific instructions to add or remove entire lines.

Save the file with the same name and location. On Mac, if you're editing in TextEdit, make sure "Plain Text" is still selected in the Format menu before you save. Close the editor and restart the program so it reads the updated settings.

Common mistakes and how to avoid them

The most common error is saving the file with the wrong extension or in the wrong location. The program won't find it, and it will behave as if the INI file doesn't exist. Always check the program's documentation or settings folder to confirm the exact filename and path.

Another frequent mistake is using the wrong text editor. Microsoft Word, Google Docs, and other word processors add invisible formatting codes that break INI files. Stick to Notepad (Windows), TextEdit in plain-text mode (Mac), or other plain-text editors like Notepad++, VS Code, or Sublime Text.

Spacing and capitalization can also cause problems. Don't add extra spaces around the equals sign unless the documentation shows them. On Windows, capitalization usually doesn't matter, but on Mac and Linux it does — check your program's documentation to be safe.

Before editing an existing INI file, make a copy and keep it in the same folder with a name like config.ini.backup. If something goes wrong, you can delete the broken version and rename the backup back to the original name.

Where programs store INI files

On Windows, INI files are often in the program's installation folder (usually C:\Program Files\ or C:\Program Files (x86)\) or in the user's AppData folder (C:\Users\[YourUsername]\AppData\Roaming\ or Local\). Some older programs store them in the Windows system folder itself.

On Mac, they're typically in ~/Library/Preferences/, ~/Library/Application Support/, or inside the program's own folder (right-click the program, select "Show Package Contents," and look inside). Hidden folders in Mac start with a dot and don't show by default — press Command+Shift+Period in the Finder to reveal them.

If you're not sure where to put the file, check the program's help documentation, settings menu, or support website. Some programs let you specify the INI file location in their preferences.

Testing your INI file

After you create or edit an INI file, restart the program completely. Don't just close and reopen it — fully quit the program and start it again. This forces the program to read the INI file fresh.

Watch for error messages or unexpected behavior. If the program crashes or behaves strangely, the INI file may have a syntax error. Check for missing equals signs, mismatched brackets, or typos in section headers. If you can't find the problem, restore your backup copy and try again.

Some programs write error details to a log file. Check the program's folder or the same location as the INI file for a file named something like error.log or debug.log. These logs can point you to the exact line causing the problem.

Frequently Asked Questions

Can I create an INI file with a different name?

Only if the program's documentation says so. Most programs look for a specific filename in a specific location. If you name it something else or put it in the wrong folder, the program won't find it. Check the documentation before you save.

What if I open an INI file and it looks like gibberish?

You opened it with the wrong editor. Close it without saving and try again with Notepad (Windows) or TextEdit in plain-text mode (Mac). If it still looks wrong, the file may be corrupted — restore your backup copy.

Do I need to restart my computer after editing an INI file?

No, but you do need to fully restart the program that uses the INI file. Close it completely and open it again. Restarting your computer will also work, but it's not necessary.

Can multiple programs share the same INI file?

Technically yes, but it's risky. Each program expects its own settings in its own file. Sharing an INI file between programs usually causes one or both to malfunction. Create separate INI files for each program unless the documentation explicitly says they share one.

What's the difference between INI files and other config file types?

INI files are one of several formats for storing settings. Others include JSON, YAML, XML, and TOML. Modern software often uses these newer formats, but INI files are still common in Windows and older programs. Use whatever format the program's documentation specifies.