INI to JSON Converter
Turn an .ini, .cfg or php.ini style config file into JSON, or write JSON back out as INI.
How to use the INI to JSON Converter
- Paste or open the filePaste an INI file (or .cfg, .conf, php.ini, desktop.ini) or JSON, or open the file. The direction switches automatically for JSON files.
- Choose the optionsDetect numbers and true/false values, and turn [a.b] section names into nested objects. For JSON → INI, choose the spacing around =.
- Copy or downloadCopy the result or download it as config.json or config.ini.
Example
[database] with port = 5432 becomes "database": {"port": 5432}, and [database.pool] is nested inside it.
hosts[] = smtp1… repeated twice becomes the array "hosts": ["smtp1.example.com", "smtp2.example.com"]. The sample has 3 sections, 11 keys and 2 comments.
Frequently asked questions
Is there one INI standard?
No. INI is an informal format, and programs differ in the details. This tool follows the most common rules: [sections], key = value or key: value, ; and # comments, quoted values and key[] arrays (as in PHP).
What happens to keys outside any section?
They go at the top level of the JSON. When converting JSON back, top-level simple values are written first, before any [section].
How are deeper JSON objects written?
Nested objects become dotted sections, so {"server": {"ssl": {"enabled": true}}} becomes [server.ssl] with enabled = true.