ini file configuration feature

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

ini files looks like properties file with comments, headers

Key and values

ini file contains group of items, each item contains key and values separate by equal symbol

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


sections are grouped similar key and value pair under one name enclosed in square bracket, thse are called sections or header.

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


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

; comment text

Options with same key and multiple different values

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


Important rules

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