INI Formatter

INI Syntax Reference

; This is a comment (semicolon) # This is also a comment (hash) [section_name] key = value another_key = another value quoted = "value with spaces" empty = [database] host = 127.0.0.1 port = 5432 user = admin password = secret [section.subsection] ; dotted subsection (some parsers) key = value

INI Format Rules

ElementSyntaxNotes
Section[section_name]Case-sensitive in most parsers; must be on its own line
Key-Valuekey = valueWhitespace around = is usually trimmed
Comment; comment or # commentMust be on its own line (not inline, in most parsers)
Empty valuekey =Valid; results in empty string
Global keyskey = value (before any section)Some parsers support a default/global section
Multi-lineBackslash continuation: value = long\Not universally supported