TOOLTIKI Lovable tool, really free
Developer Config

INI formatter

What to do

Processed in your browser · nothing is uploaded

Local · no INI standard exists, so nothing is rewritten
Advertisement
320 × 100

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

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

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.

Python — configparser and INI syntax
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING