INI Formatter - Format and Beautify INI Configuration Files Online
Clean up the spacing of INI configuration files and check their section headers, without touching comments or values.
How to Format INI Files - Step by Step Guide
Input Your INI Configuration Data
Let's get your INI configuration file into the formatter! Whether you're working with application configs, Windows INI files, or configuration data, you have several convenient options:
Example: Unformatted INI Input
Uneven spacing, stray blank lines and no gap before the next section:
[database] host=localhost port =5432 username= admin [server] host=0.0.0.0 port=8080 debug =true
Automatic Formatting & Validation
The output updates while you type. The formatter:
Example: Formatted Output
The same file after formatting. The values have not changed:
[database] host = localhost port = 5432 username = admin [server] host = 0.0.0.0 port = 8080 debug = true
Choose Format Options
There are two ways to see the result:
Export Your Formatted INI
When the output looks right:
Frequently Asked Questions
What exactly does the formatter change?
Only whitespace that INI readers ignore. It puts one space on each side of the first = in a key line, removes trailing spaces, squeezes runs of blank lines down to one and leaves a blank line before every [section] (above any comment lines that belong to it). Indentation is left alone, because Python's configparser reads an indented line under a key as part of that key's value.
Will my values and comments come out the same?
Yes. Lines are not parsed and rewritten, so comments stay where they were and values keep every character: abc#123, #ff0000, quoted text, Windows paths, 8901240544102066246, 00501 and 14.50 are all left as typed. Repeated keys are kept too. A line with a quoted key, or with a colon before the first =, is left exactly as it is, since respacing it could change how some readers split the key from the value.
What does Minify do, and how do I get the formatted version back?
Minify drops comment lines, blank lines and the spaces around =, which is handy for a config baked into a script or a container image. The button then reads Format; click it to go back. A blank line inside a multi-line Python value is kept, because removing it would change the value.
Which mistakes does it point out?
A section header without its closing ], text after a section header that is not a comment, and a line that starts with = and so has no key. Each one is reported with its line number. It also tells you when the text is really JSON, XML, YAML or TOML. It does not check key names or values against what your application expects, and a line without an = sign is kept as typed: the Node ini package reads it as a switch that is on, while Python needs allow_no_value=True.
Can I format large INI files?
Uploads up to 10 MB are accepted. Formatting happens in your browser and a few thousand lines take well under a second; most of the time on very big files goes into drawing the editor.
Is the INI formatter free, and does my file leave my computer?
It is free and needs no account. Your INI text is formatted in the browser and is not sent to our server, which matters for files that hold passwords or connection strings.
Need the data rather than a tidier file? INI to JSON reads the same file into JSON.
Related Tools
INI Validator
Validate INI syntax and structure with detailed analysis
INI Fixer
Fix broken INI config files automatically, repair missing sections, duplicate keys, and syntax errors
INI to JSON
Convert INI configuration files to JSON format
JSON to INI
Convert JSON data to INI configuration format
INI to YAML
Convert INI configuration files to YAML format
YAML to INI
Convert YAML configuration files to INI format