ini file configuration feature

ini file is a file extension and data format for configuration and setup files for software applications. ini is abbreviated as Initialize values very popularly used by the Windows Operating System.

ini files look like properties files with comments, headers

Key and values

ini file contains a group of items, each item contains keys and values separated by the equal symbol

  • the key is a valid identifier that will not contain = or ; symbols.
  • The value is the valid identifier of any string
  • Key can be String, number, or Boolean values.


sections are grouped with similar key and value pairs under one name enclosed in a square bracket, these are called sections or headers.

[Section or Header]
  • Section or Headers contain multiple keys and value pairs in a separate line
  • There can be multiple sections
  • section is optional


Comments are ignored by the compiler. ; symbol at the beginning of a line tells it is a comment and is ignored by the processor.

; comment text

Options with the same key and multiple different values

Options are identified using the same key with different values. Each option is declared in a separate line as follows.


How to write multiline values for a given key?

You can write a key with a single line value, However, you can write a multi-line value using triple quotes with prefixes and suffixes of multiple values.

key = """
This is a

Another way to write a multi-line value, is the second statement is prefixed with spaces

key = Statement one.
       Statement Two.

Ini Array values for a given key

The key can contain multiple values as an array. Defined a key prefixed with [], and assign the value. The same key is used for multiple values assignment.

days[] = Saturday
days[] = Sunday

Special and Escape characters for a values

You can not define keys with special and escape characters, but values can contain them.

Special characters

special = !@#$%^&*()_+

Escape characters

programfiles = c://programfiles
temppath = c:/temp

Important rules:

  • section and key names are cases insensitive
  • section and key can not be spaces
  • section, key, and values are encoded in ISO 8859-1
  • Binary data can be encoded in ASCII or ISO 8859-1
  • if the same multiple section names are there, the last section considers
  • Nested sections are not allowed.

Supported Features

Single Comments
In line Comments

| Multi line Comments | ✅ | | Key-value separator | ✅ | | Sections | ✅ | | Section Whitespace | ✅ | | Speacial Characters Value | ✅ | | Multi-line strings Values | ✅ | | Array concatenation | ✅ | | Nested Sections | ✅ | | Escape Characaters | ✅ |