Skip to content
uencoder

INI File Format Guide

Reference for the INI configuration file format with sections, keys, values, and comments.

Structure

INI files organize settings into sections marked by [section] headers. Each section contains key=value pairs. Comments start with ; or # characters. Values may be quoted to preserve whitespace. The format is not formally standardized, leading to parser differences in multiline values, nesting, and type interpretation. Despite this, INI remains widely used for simple configuration.

sections
Bracketed headers
[database]
key=value
Settings pairs
port = 5432
comments
; or # prefix
; comment

Parser Differences

Some parsers support nested sections using dot notation or indentation. Multiline values may use continuation characters or indentation, but support varies. Type handling differs: some parsers return all values as strings, others infer types. Libraries like Python configparser and Node ini have different feature sets. For portability, avoid advanced features and keep values simple.

nesting
Varies by parser
dot or indent
multiline
Not universally supported
continuation chars
types
Often string-only
manual conversion

Related tools

References