INI formatter
Processed in your browser · nothing is uploaded
Tidies an INI file: sections flush left, keys indented under them, one space either side of the equals, comments kept where they are and one blank line before each section.
How to use the ini formatter
INI has no specification, which is the single most important thing to know about it. Every parser invented its own rules, and they disagree on almost everything interesting: whether ; or # starts a comment, whether a comment can follow a value on the same line, whether quotes around a value are part of it, whether keys are case-sensitive, and whether duplicate keys mean the last wins or a list. Nothing here changes any of that; it reindents and leaves the content alone.
The practical consequence is that a value should be written as plainly as possible. A trailing comment after a value is the most portable thing to avoid: PHP’s parser strips it, Python’s configparser historically kept it as part of the value, and a config that works in one and silently misbehaves in the other is very hard to spot.
Whitespace around the equals is the other common trap. Some parsers trim it and some do not, so key = value can produce a value of " value" with a leading space. Writing it consistently at least makes the behaviour consistent.
Questions
No. Every parser made its own rules, and they disagree on comments, quoting, case and duplicate keys.
You can write one, but whether it is stripped depends entirely on the parser. Put comments on their own line.
Depending on the parser, yes. That is why consistent spacing matters more than which spacing you pick.
Both ; and # are common. ; is the older convention and the more widely accepted.
No. Everything runs in your browser, which matters when the file holds credentials or customer data.