JSON to INI Converter — Free Online

JSON to INI Converter

Paste a JSON object and get an INI file — sections, keys and values — for applications that read INI configuration. Conversion runs in your browser; nothing is uploaded.

How the conversion works

  • Each top-level object becomes a [section] with its keys as key=value lines.
  • Top-level values that are not objects are written before the first section.
  • Arrays use indexed keys: replicas[0]=db2, replicas[1]=db3.
  • Values are written as text, since INI has no data types.

Example

{
  "app": { "name": "demo", "port": 8080, "debug": true },
  "database": { "host": "localhost", "replicas": ["db2", "db3"] }
}

becomes

[app]
name=demo
port=8080
debug=true
 
[database]
host=localhost
replicas[0]=db2
replicas[1]=db3

Which INI flavour do you need?

  • Python configparser, Git config, MySQL my.cnf, systemd-style files read plain sections and keys. Avoid arrays, which these parsers treat as literal key names.
  • PHP (php.ini, parse_ini_file()) understands key[] and key[sub] arrays — use JSON to PHP INI for full PHP syntax, including nested objects.
  • Windows .ini files follow the same section/key format.

Tips

  • Deeply nested JSON does not fit INI's two levels well. Consider TOML, which supports nested tables and real types: JSON to TOML.
  • Check the result by converting it back with INI to JSON.