What Is a .INI File?

A .ini file is a plain-text configuration file that stores settings as key=value pairs grouped under [Section] headings. Windows programs, games and many cross-platform tools use INI files for options such as resolution, paths and preferences. Any text editor, including Notepad and TextEdit, can open and edit them.

Extension
.ini
Full name
Initialization File
Type
System and app file

About INI files

INI files date from early Windows, where WIN.INI and SYSTEM.INI held system settings before the registry replaced them. The format is informal: lines like [Graphics] start a section, Resolution=1920x1080 sets a value, and lines beginning with a semicolon are comments. Each program decides which keys it reads.

Games are the most common place people edit INI files, to change settings the menu does not expose. Edit only with the game or app closed, because many programs overwrite the file with their current settings on exit. Keep a backup copy first, and save with the same encoding; some programs fail on files saved as UTF-8 with a byte order mark.

desktop.ini is a hidden system file in Windows folders that stores custom icons and display names. Deleting it is harmless but resets that folder's customization, and Windows may recreate it. An INI cannot run code by itself, though it can point programs to files they then load.

What INI files are used for

  • Game settings such as graphics, controls and mods
  • Program preferences and paths
  • Windows folder customization (desktop.ini)
  • Settings for PHP (php.ini), Git and Python tools

How to open a .ini file

Windows

Right-click and choose Open with > Notepad, or use VS Code. Double-clicking usually opens Notepad.

Mac

Open with TextEdit (set to plain text) or VS Code.

Linux

Any editor such as nano, gedit or VS Code opens INI files.

How to convert a .ini file

INI is plain text; to use the same settings in JSON, YAML or TOML, rewrite them by hand or with a small script, since there is no single standard mapping.

Renaming .ini to .txt makes it open in a text editor by default, but the program will no longer find its settings, so rename it back afterwards.

Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.

Naming and renaming INI files

  • Keep the exact file name the program expects; renaming config.ini to config-old.ini is a quick way to reset settings to defaults.
  • Before editing, copy the file with a date suffix (game-settings-2025-08-01.ini.bak) so you can restore it.
  • Do not rename or delete desktop.ini files unless you want to remove a folder's custom icon or name.

Renaming lots of .ini files? Use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.

Related file types

Frequently Asked Questions

How do I open an INI file?

With any text editor: Notepad on Windows, TextEdit on Mac, or VS Code anywhere.

Can I delete desktop.ini?

Yes, it is safe, but the folder loses its custom icon or name and Windows may recreate the file.

Why do my INI changes keep getting reset?

The program rewrites the file when it closes. Close the program first, edit, save, and then start it again.

More system and app file extensions · all file extensions