.ini

What is a .ini file?

Initialization / Configuration File · Code and data · Microsoft (popularized in early Windows) · 1980s

An INI file is a simple text file that stores a program's settings as key=value pairs grouped under [sections]. Programs read it at startup to remember your options, and you can edit it in any text editor.

Category
Code and data
MIME type
Type
Plain text
Is a .ini file safe to open? Safe: an INI is plain text. Editing the wrong value can misconfigure the program, so keep a backup before you change one.

What is a .ini file used for?

The format is deliberately plain: lines like key=value, grouped under headings in square brackets, with a semicolon starting a comment. That simplicity is why it has stayed in use for decades.

INI files came from early Windows but are still everywhere, from games to desktop apps, whenever a program needs a small, human-editable settings file.

You can change settings by editing the file directly, which is handy when an app has no option for something in its menus. Back the file up first, because a wrong value can misconfigure the program.

It is plain text, so it cannot run and is safe to open. The only risk is breaking a setting, which you fix by restoring your backup.

How to open a .ini file

The .ini format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Notepad
  • Notepad++
  • VS Code

macOS

  • TextEdit
  • VS Code

Linux

  • Any text editor

Web

  • Any online text viewer

How to convert a .ini file

You can convert a .ini file to Already plain text using a conversion tool or the export menu of an app that opens it.

.ini file signature (magic bytes)

Programs recognise a .ini file by the bytes at the start of the file, not by its name. These are the signatures for INI.

Hex signatureOffsetNote
(no fixed signature)0plain text; [sections] with key=value lines, ; for comments

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .ini file?

An INI file is a simple text file that stores a program's settings as key=value pairs grouped under [sections]. Programs read it at startup to remember your options, and you can edit it in any text editor.

How do I edit an INI file?

Open it in a plain-text editor such as Notepad or VS Code, change the value after the equals sign, and save. Make a backup copy first so you can undo a mistake.

Is it safe to edit an INI file?

Yes, the file itself is harmless text. The only risk is setting a wrong value and confusing the program, which you can undo by restoring your backup.

Related formats

Sources

Details on this page were checked against authoritative references: