Home

INI

INI is a simple plain text format used for software configuration. The name is commonly understood to stand for initialization file, and the format was popular on early Windows systems, where configuration data was stored in files with the .ini extension such as system.ini and win.ini. INI files are still used by some applications and increasingly replaced by other formats, but remain in use in many cross-platform projects and tools.

The typical INI structure consists of sections and key-value pairs. Sections are indicated by a name enclosed

Because there is no universal standard for INI, behavior varies by parser. In Windows, the API functions

in
square
brackets,
for
example
[Display].
Within
a
section,
lines
in
the
form
key=value
assign
values
to
options.
Comments
are
usually
introduced
with
a
semicolon
or
a
hash
character.
Whitespace
around
keys
and
values
is
generally
ignored
by
parsers,
and
values
are
treated
as
strings.
Many
implementations
also
allow
empty
values,
and
some
variants
support
multiline
values
or
alternative
separators
such
as
a
colon,
but
the
equals
sign
is
the
most
common.
GetPrivateProfileString
and
WritePrivateProfileString
provide
a
legacy
mechanism
to
read
and
write
INI
data,
treating
keys
and
sections
as
case-insensitive.
Across
platforms,
libraries
exist
in
numerous
languages
to
read
and
write
INI
files,
with
differing
rules
for
case
sensitivity,
encoding,
and
continuation
lines.
INI
remains
valued
for
simple,
human-readable
configuration
but
is
often
supplanted
by
more
expressive
formats
such
as
JSON,
YAML,
or
TOML
for
complex
data.