[section] → JSON Object
Each INI [section] header becomes a top-level JSON key whose value is an object of that section's key-value pairs. The mapping is always predictable: [database] becomes {"database": {"host": ..., "port": ...}} — no ambiguity.
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Convert JSON objects to INI and parse INI back to JSON.
INI is the oldest config format still in active use — php.ini, my.cnf, .gitconfig, and hundreds of legacy apps all use it. Sections in square brackets contain flat key=value pairs. Converting it to and from JSON without a custom script is fiddly, especially when dealing with section-less global keys, both ; and # comment styles, and the absence of any formal spec. This converter handles PHP, MySQL, Git, and Python configparser conventions. Each section becomes a top-level JSON object key. Section-less keys are placed at the JSON root, matching how PHP and Python's configparser both interpret them. Comment stripping, quoted value handling, and optional boolean and number coercion are configurable. Sysadmins with production passwords in my.cnf and developers with API tokens can use this safely — no data leaves the browser.
Each INI [section] header becomes a top-level JSON key whose value is an object of that section's key-value pairs. The mapping is always predictable: [database] becomes {"database": {"host": ..., "port": ...}} — no ambiguity.
Recognises both Unix-style # and Windows/PHP-style ; comment markers and removes them when converting to JSON. A warning is shown that comments cannot be reconstructed, so you can preserve them manually if needed.
Values wrapped in double or single quotes are unwrapped when parsing. On output to INI, values containing spaces, special characters, or ambiguous patterns are automatically re-wrapped in quotes to ensure the config is parsed correctly.
Strings like "true", "1", and "yes" can be converted to real JSON booleans and numbers with configurable coercion, or kept as strings to preserve original config behaviour. Toggle based on how your downstream code reads the values.
Top-level keys appearing before any [section] header are placed at the JSON root object, matching how PHP's parse_ini_file() and Python's configparser both interpret global keys. No data is lost and no extra wrapper object is added.
Database passwords inside my.cnf, authentication tokens in app.ini, and API keys in any config file stay entirely on your machine. No upload, no logging, and no network request is made during conversion.
Input: [client] port = 3306 socket = /tmp/mysql.sock [mysqld] user = mysql bind-address = 127.0.0.1 max_connections = 200
Output: { "client": { "port": 3306, "socket": "/tmp/mysql.sock" }, "mysqld": { "user": "mysql", "bind-address": "127.0.0.1", "max_connections": 200 } }
Input: { "app": { "name": "reporter", "debug": true }, "smtp": { "host": "mail.local", "port": 587 } }
Output: [app] name = reporter debug = true [smtp] host = mail.local port = 587
Input: version = 2 log_level = info [server] port = 8080
Output: { "version": 2, "log_level": "info", "server": { "port": 8080 } }