INI Formatter
Format, beautify and validate INI configuration files online. Clean up INI syntax with proper spacing and section structure.
Input
Output
What is an INI File?
An INI file is a simple configuration file format used by many applications, especially on Windows. It organizes settings into named sections (e.g. [database]) with key-value pairs separated by an equals sign. You can read more about the format on Wikipedia.
The INI Formatter normalizes spacing around =, ensures consistent blank lines between sections, and removes trailing whitespace — making config files easier to read and maintain. Languages like Python handle INI files via the built-in configparser module, and tools like Git use the same format for git config.
How to Use
Paste your INI content
Paste raw or messy INI text into the left editor, or click Upload to load a file.
Instant formatting
The formatter automatically normalizes spacing, aligns = separators, and adds blank lines between sections.
Copy or download
Use the Copy button to copy the result, or Download to save it as a .ini file.
Formatting Example
Example: Format a configuration file
Unformatted input:
[database]
host=localhost
port=5432
name=myapp
[server]
host=0.0.0.0
port=8080
debug=trueFormatted output:
[database]
host = localhost
port = 5432
name = myapp
[server]
host = 0.0.0.0
port = 8080
debug = trueFrequently Asked Questions
What is the difference between INI and TOML?
INI is a simpler, older format with no data types — all values are strings. TOML supports typed values (integers, booleans, arrays) and nested tables, making it more suitable for complex configurations.
Are comments supported in INI files?
Yes. Lines starting with ; or # are treated as comments and are preserved by the formatter.
Can I upload a .cfg or .conf file?
Yes — many config files use INI syntax regardless of their extension. You can paste the content directly or upload any text file. PHP, for example, uses parse_ini_file() to read this format natively.
Does INI support nested sections or arrays?
Standard INI files don't support nesting or arrays — sections are flat key=value lists. Some parsers like PHP's parse_ini_file() add optional array support using key[] = value syntax, but this isn't universal. If you need proper nesting and data types, consider TOML instead.