JSON to INI Converter
Example
Input:
{"debug": true, "database": {"host": "localhost", "port": 5432}}Output:
debug = true [database] host = localhost port = 5432
About this converter
INI is flat by design, so the JSON mapping is structural: top-level strings, numbers and booleans become bare key = value lines (which must come before any section, per INI convention), and each top-level object becomes a [section] containing its scalars. Arrays and deeper nesting have no honest INI representation — instead of inventing one, the converter leaves them out of sections it cannot represent and the About note says so: if your JSON is deeply nested, INI is simply the wrong target format and YAML or TOML will serve you better. Values containing ; or # are quoted so comment characters survive the round trip.
Frequently Asked Questions
Where did my nested object's array go?
INI cannot express arrays; the converter omits what it cannot represent rather than corrupting it. Use TOML for array-friendly config.
Can the output be read by Python configparser?
Yes — the output follows the common dialect configparser reads, with sections and key = value pairs.