File Extension File Extension Guide

What is an INI File?Config

A guide to the .ini extension, the classic plain-text configuration file. What an INI file holds, how its sections and key=value settings work, how it compares to formats like TOML and JSON, and how to open and edit one safely.

Configuration File ⚙️ Sections and key=value 📝 Plain text, editable 🪟 Windows heritage
.INI

INI Configuration File

Type:Configuration (plain text)
Extension:.ini
Full Name:Initialization file
Structure:Sections, key=value
Opens With:Any text editor

⚙️ What is an INI File?

An INI file is a plain-text configuration file that stores a program's settings. Its name is short for initialization, and it keeps those settings as simple key=value entries grouped under named sections.

Think of it as a tidy list of preferences a program reads when it starts up. Rather than burying options inside the program's code, a developer puts them in a small readable file so they can be changed without rebuilding anything. Open one in a text editor and you see a heading in square brackets that names a group of related settings, followed by lines like a setting name, an equals sign and its value. The program loads the file at launch, reads those values, and behaves accordingly, which is why an INI file is often the thing you edit to change how an application looks or works.

The format goes right back to the early days of Microsoft Windows, where files such as win.ini and system.ini held the settings for the operating system itself. Windows later shifted much of that job to the Registry, and newer programs often reach for formats like TOML or JSON, yet the humble INI file never went away. Its plainness is its strength, so games, desktop utilities and countless smaller tools still lean on it for settings that do not need anything fancier. The sections below show exactly what sits inside an INI file, how it stacks up against those newer formats, and how to open and edit one without breaking anything.

Key Characteristics

  • Stores program settings as plain text
  • Groups settings into named sections
  • Uses simple key=value entries
  • Read by a program when it starts

Good to Know

  • Editable in any plain text editor
  • Rooted in early Microsoft Windows
  • Flat structure with no nesting
  • Still common for games and small apps
💡 Why it matters: An INI file is where a program keeps its settings in readable form. Because it is just text, you can open it, change a value and save it to adjust how the software behaves, which is why it is so often the file people are told to edit.

⚡ Quick Facts

File Extension.ini
Full NameInitialization file
File TypeConfiguration file (plain text)
StructureSections with key=value pairs
OriginEarly Microsoft Windows, mid-1980s
CommentsLines starting with ; or #
Opens WithNotepad, Notepad++, VS Code, any editor
Related FormatsCFG, TOML, YAML, JSON

🔎 Inside an INI File

The whole appeal of the format is how little there is to learn, since an INI file is built from just three kinds of line, and once you have seen them you can read almost any example.

The first is a section header, a name wrapped in square brackets like a bracketed label, which marks the start of a group of related settings. Everything below it belongs to that group until the next header appears. The second is a property, which puts a setting name to the left of an equals sign and its value to the right, all on one line, and this is the actual setting being stored. A section can hold as many of these as it needs. The third is a comment, a human-readable note the program skips over, flagged at the line's start with a semicolon or a hash. A blank line does nothing but separate things for readability. That is the entire format. There is one deliberate limit worth knowing, which is that INI is flat, so a section cannot contain another section, and settings never nest inside one another the way they can in richer formats. Small details vary between programs, such as whether section names are treated as case sensitive, but the shape above holds almost everywhere.

An INI file groups settings under bracketed section headers

; display settings for the app
[Display]
Resolution=1920x1080
Fullscreen=true

# where the program saves files
[Paths]
SaveFolder=C:\Users\Sam\Documents
AutoSave=10

📐 Syntax Rules and Common Mistakes

Beyond the three line types, a handful of small rules decide whether a program reads your INI file cleanly, and knowing them saves a lot of head-scratching when a change does not take effect.

Comments with a semicolon or hash

A comment starts with a semicolon, and many programs also accept a hash. Anything after that marker on the line is skipped, which is handy for two things. You can leave yourself a note explaining what a setting does, and you can temporarily switch a setting off by adding a semicolon in front of it rather than deleting the line, so it is easy to put back. Most comments sit on their own line. Some parsers allow a comment after a value on the same line, but not all do, so a note on its own line is the safe choice.

Case sensitivity and whitespace

On Windows, section names and keys are usually treated as case insensitive, so Fullscreen and fullscreen mean the same key, though values are often case sensitive. Spaces around the equals sign are normally trimmed, but stray spaces inside a value can matter, so it is wise not to add spaces you did not mean. Because these small behaviours differ between the programs that read INI files, the golden rule is to match the style already in the file and, when something specific matters, to check the documentation for the software that owns it.

Mistakes that trip people up

Most broken INI files come down to a few repeat offenders. Listing the same key twice inside one section is a common one, since the program may only honour one of them and ignore the rest, so keep every key unique within its section. Putting a setting above any section header, or trying to tuck one section inside another, both break the flat structure the format expects. A comment written with a marker the program does not recognise can be read as a setting by mistake. Each one is simple to sidestep once you have seen it, and the infographic below sets every mistake beside the habit that heads it off.

Editing an INI file: what to avoid ✗ Common mistakes Same key twice in one section A setting with no section above it Nesting one section in another A comment mark the app rejects Stray spaces around a value program ignores it or fails to start ✓ Safe habits Keep each key unique per section Put settings under a [section] Keep it flat, no nesting Back up before you edit Change one value, then test the program reads it cleanly

🔀 INI vs TOML, YAML and JSON

INI is one of several ways a program can store its settings in text, and the newer formats each add power that INI deliberately leaves out, so the right choice depends on how complicated the settings are.

What sets INI apart is that it is the simplest and easiest to read by eye, a flat list of grouped settings with almost no punctuation to trip over. That simplicity is also its ceiling. TOML looks a lot like INI at a glance but adds proper data types and the ability to nest settings, which is why it is often recommended for modern projects that outgrow INI. YAML leans on indentation instead of brackets and handles deeply structured data, popular in DevOps and application config. JSON, built for programs to exchange data, nests freely and is strict about syntax, which makes it capable but fussier to write by hand. XML, older and more verbose, took over from INI in some Windows software before the others arrived. The takeaway is that INI wins when the settings are small and simple and you want a human to read them at a glance, while TOML, YAML and JSON earn their extra syntax when the data grows nested or needs strict types. For a game's options or a small utility, INI is usually still the friendliest option. It is worth knowing that INI has no single official standard the way JSON does, so different programs implement it with slight variations, which is why matching the style already in a file and checking the owning software's documentation is always the safe habit.

FormatStructureBest For
INIFlat sections, key=valueSmall, simple settings
TOMLSections plus types and nestingModern config that outgrows INI
YAMLIndentation, deeply nestedDevOps and app config
JSONNested, strict syntaxData exchange between programs
✅ In short: INI is the plainest of the configuration formats, ideal when settings are few and flat. TOML, YAML and JSON add nesting and richer data, which matters only once the configuration grows beyond what INI comfortably holds.

🗄️ INI Files vs the Windows Registry

If INI files were how early Windows stored settings, a fair question is why Windows moved so much of that job to the Registry, and the answer explains both what the Registry fixed and why INI files never disappeared.

The Registry is a single central database built into Windows that holds settings for the system and for many programs in one place. Microsoft introduced it to solve real problems with scattered INI files. Because an INI file could live anywhere, an administrator could not easily check or set the same option across every machine on a network, whereas a central database made that straightforward. INI files also offered no fine-grained security, since permissions applied to the whole file rather than to individual settings, and two programs writing to the same file at once could quietly overwrite each other's changes. The Registry addressed all of these. Yet the trade-off is that the Registry is a system-wide database you edit with a special tool and can damage if you are careless, while an INI file is a small, self-contained text file you can read, copy, back up and edit with nothing more than Notepad. That plainness and portability is exactly why so many programs, especially games, cross-platform tools and lightweight utilities, still prefer an INI file for their own settings even though Windows itself leans on the Registry.

AspectINI FileWindows Registry
What it isA small text fileA central system database
ScopeUsually one programThe whole system
Edit withAny text editorThe Registry Editor
PortableYes, copy the fileNo, tied to the machine
Risk if wrongAffects one programCan affect all of Windows
⚠️ Worth remembering: An INI file only affects the program it belongs to, so a mistake is easy to undo by restoring your backup. The Registry is system-wide, which is why editing it calls for far more caution.

📂 How to Open an INI File

Because an INI file is plain text, opening one needs nothing special, and any text editor on any system will show you its contents.

On Windows the built-in Notepad opens an INI file straight away, and Notepad++ or Visual Studio Code are nicer if you edit them often, since they colour the sections and values to make them easier to scan. On a Mac, TextEdit works as long as you keep it in plain text mode, and on Linux any editor such as gedit or nano does the job. If double-clicking an INI file does not open it, or opens the wrong program, right-click it, point to Open with, and select a text editor from the list. A word processor like Microsoft Word is the one thing to avoid, because it can add hidden formatting that corrupts the file. It is also worth remembering that many INI files are used quietly by software in the background, so you can look inside to understand a setting even when you have no reason to change it.

📝 How to Edit an INI File Safely

Editing an INI file is usually as simple as changing a value and saving, but a couple of habits keep you out of trouble when the file controls how something runs.

The single most useful habit is to make a backup copy before you touch anything, so that if a change misbehaves you can drop the original back into place. When you do edit, change one value at a time and test it, rather than altering several at once and losing track of which one mattered. Keep the syntax exactly as you found it, with section headers in their square brackets and each setting as name, equals sign and value, since a stray bracket or a missing equals sign can stop the program reading the file. If you get an access denied message when saving, the file usually sits in a protected location, and the fix is to open your editor as an administrator or to copy the file to your desktop, edit it there and paste it back. Save in plain text, and if the file was a system one like desktop.ini, refresh or restart the program so it picks up your change. A couple of small touches help too. Some settings expect their text wrapped in quotation marks and others do not, so it pays to follow whatever the existing entries do, and it is best to avoid adding spaces right before or after the equals sign unless the file already uses them.

🛠️ What INI Files Are Used For

INI files turn up wherever a program needs to remember a set of choices, and their long history means they appear in some very familiar places.

Their classic home is application settings, where an option you toggle in a program's preferences is often written straight into an INI file behind the scenes. Games lean on them heavily for graphics, controls and audio options, which is why tweaking a game's INI is a common way to reach settings the menus do not show. Windows itself uses them for small jobs, the best-known being desktop.ini, a hidden file that stores how a particular folder looks, such as a custom icon. Installers and setup programs read INI files to know what to put where, and lightweight utilities favour them because a tiny text file is easy to ship and easy to fix. Across all of these the appeal is the same, an INI file is a small, readable place to keep settings that both a program and a person can work with, which is exactly why a format from the 1980s is still in everyday use. Behind the scenes, the software reads the file with a small piece of code called a parser, and most programming languages ship a ready-made one, such as the configparser module in Python, so developers rarely have to handle the format by hand.

❓ Frequently Asked Questions

The three parts of an INI file ; a comment, ignored [Display] Resolution=1920x1080 Fullscreen=true [Audio] Volume=80 [ ] Section header names a group of settings key=value Property the actual setting stored ; or # Comment a note the program ignores the program reads these values at startup and applies them

An INI file is a plain-text configuration file that stores a program's settings. The name is short for initialization, and it keeps settings as key=value entries grouped under named sections written in square brackets. A program reads the file when it starts and uses the values to decide how to behave. Because it is just text, you can open an INI file in any editor, change a value and save it to adjust the software. The format dates back to early Microsoft Windows and, though newer formats like TOML and JSON now exist, it is still widely used by games, desktop apps and small utilities for simple settings.

Open it in any plain text editor. On Windows, Notepad opens an INI file straight away, and Notepad++ or Visual Studio Code are better if you work with them often because they colour the sections and values. On a Mac, TextEdit works in plain text mode, and on Linux an editor like gedit or nano does the job. If a double-click opens the wrong program or nothing at all, right-click it and use Open with to select a text editor. The one program to avoid is a word processor such as Microsoft Word, since it can add hidden formatting that breaks the file.

It is safe as long as you take a little care, because an INI file only stores settings and changing one simply changes how the program behaves. The sensible precaution is to copy the file first, so you can restore the original if a change causes trouble. Keep the structure exactly as you found it, with section names in square brackets and each setting as name, equals sign and value, since a small typo can stop the program reading the file. Change one value at a time and test it. If you are unsure what a setting does, it is fine to look without editing, and to leave anything you do not understand alone.

desktop.ini is a hidden system file that Windows uses to remember how a particular folder should look, such as a custom icon or view options. It is written in the INI format, with a section like [.ShellClassInfo] holding the folder's settings. You normally never see it because hidden files are tucked away, and it is usually best left alone. If you delete a desktop.ini, Windows simply creates a new one when it needs it, so it is not something to worry about. It is the everyday proof that the INI format is still built into Windows itself, quietly doing small configuration jobs in the background.

TOML looks a lot like INI, with sections and key=value settings, but it adds capabilities that INI leaves out. Where INI treats every value as plain text and keeps a flat structure, TOML understands data types such as numbers, dates and lists, and it lets settings nest inside one another. That makes TOML a common choice for modern projects whose configuration has grown too complex for INI, while keeping much of INI's readability. For small, simple settings, though, INI remains perfectly suitable and slightly easier to read, which is why plenty of software still prefers it. In short, TOML is the more capable descendant, and INI is the minimal original.

Yes, very much so. Although Windows moved much of its own configuration to the Registry long ago, and modern applications often choose TOML, YAML or JSON, the INI file never fell out of use. Its simplicity keeps it popular for game settings, desktop utilities, small tools and plenty of legacy software, anywhere the configuration is small and does not need nesting or strict data types. A tiny readable text file that both a program and a person can edit remains genuinely useful, which is why a format introduced in the 1980s is still one you meet regularly today.

An INI file is a small text file that usually holds the settings for a single program, while the Windows Registry is one central database that stores settings for the whole system and many programs at once. Windows moved much of its own configuration to the Registry to fix limits of scattered INI files, such as the difficulty of managing the same setting across many machines and the lack of per-setting security. The upside of an INI file is that it stays simple and portable, so you can read, copy, back it up and edit it in any text editor, and a mistake only affects its own program. The Registry is more capable but system-wide, which is why it needs a special editor and much more care.

Start the line with a semicolon, and in many programs a hash symbol works too. Everything after that marker on the line is skipped by the software, so you can write a note about what a setting does. The same trick lets you switch a setting off without deleting it, by placing a semicolon in front of the line so the program ignores it, which makes it easy to restore later. Comments are safest on their own line. Some readers accept a comment after a value on the same line, but since not all of them do, keeping notes on separate lines avoids surprises.

It depends on the program, but the usual pattern on Windows is that section names and keys are case insensitive, so Fullscreen and fullscreen count as the same key, while values are often case sensitive. Because there is no single strict standard for INI files, different software can behave a little differently, so the reliable approach is to copy the exact spelling and capitalisation already used in the file. When a specific detail matters, checking the documentation for the program that reads the file is the surest way to know how it treats case.

Usually a small syntax slip is to blame. Check that every setting sits under a section header in square brackets, that each line places a name to the left of an equals sign and a value to the right, and that you have not repeated the same key twice in one section, since the program may then read only one of them. Make sure you did not accidentally nest sections, which the flat format does not allow, and that any comment starts with a mark the program recognises. It also helps to confirm the file was saved as plain text rather than in a word processor format. If in doubt, restore your backup copy and change one value at a time so you can see which edit caused the problem.

A few show up often. On Windows, win.ini and system.ini are historic system files from the format's early days, and desktop.ini quietly stores how individual folders look. Many programming setups include php.ini, which configures how PHP runs. Games are a rich source, keeping graphics, controls and audio choices in their own INI files inside the game's folder. Plenty of desktop utilities and older applications drop an INI file next to their program to remember preferences. If you spot one, you can open it in a text editor to see what it controls, and as long as you back it up first, adjusting a value is a safe way to change how that software behaves.

Not directly. An INI file is plain text, so every value is stored as ordinary characters, which is a big part of why it stays approachable to read and change. It is not built to hold binary content like images or compiled data. When a program does need to keep something binary in an INI file, it encodes it into text first, commonly with a scheme like Base64, so the result is still ordinary characters on the page. For anything richer than simple settings, though, that is usually a sign the software would be better served by a format designed for structured or binary data rather than by stretching INI beyond what it does well.

Key Takeaways

An INI file is a plain-text configuration file that stores a program's settings as key=value entries grouped under named sections, with its name short for initialization.

Rooted in early Microsoft Windows and kept deliberately flat and simple, it is easy to read and edit in any text editor, and it compares to newer formats like TOML, YAML and JSON, which add nesting and richer data types.

You open and edit an INI file in a plain text editor, keeping the section-and-key=value structure intact and backing it up first, and it is still widely used for games, desktop apps and small utilities.