Free INI to JSON — php.ini · .gitconfig · MySQL config

Convert INI to JSON
Sections, key=value
and type inference.

Parse any INI config file to JSON. Sections become nested objects. Supports php.ini, .gitconfig and any standard INI format. Runs entirely in your browser.

Your data never leaves your browser
[sections] → nested objects
Type inference optional
Always free
INI to JSON Converter   100% client-side
INI input
  JSON ready

      
INI parsing rules
INI syntaxJSON outputNotes
[section]{"section": {...}}Section header → nested object
key = value"key": "value"= separator
key: value"key": "value": separator also supported
; commentSemicolon comments ignored
# commentHash comments ignored
port = 3306"port": 3306Numbers inferred (basic mode)
debug = true"debug": trueBooleans inferred (full mode)
key ="key": nullEmpty value → null
Common INI file formats
php.ini

Parse PHP configuration files to inspect settings programmatically. Use the "Basic (numbers only)" type mode to preserve values like 2M, On and Off as strings — PHP treats these specially and they shouldn't become booleans.

.gitconfig

Parse Git configuration files to JSON for tooling and scripts. The [core], [user], [alias] sections become nested objects — easy to inspect and manipulate programmatically.

MySQL / MariaDB config

Parse my.cnf or my.ini database configuration to JSON for documentation, comparison or migration scripts. The [mysqld], [client] sections map naturally to nested JSON objects.

Windows Registry / app configs

Many legacy Windows applications use INI files for configuration. Convert them to JSON for processing in modern tooling, migration to newer config formats (YAML, TOML, JSON) or feeding into APIs that expect JSON.

Popular searches
ini to json convert ini to json ini to json converter ini file to json convert ini file to json ini to json online ini to json python php ini to json parse ini file json

INI parsed in your
browser. No upload.

The parser handles all standard INI variants: both = and : as key separators, semicolon ; and hash # comments, quoted values, and inline comments stripped from values. Keys before the first section are placed at the root level or grouped under "global".

3 type modes
Basic (numbers only), Full (numbers + booleans) or None (all strings) — choose the right mode for your INI format.
= and : separators
Both key=value and key: value are supported — .gitconfig uses : while most others use =.
Global keys option
Keys before the first section can go at root level or be grouped under a "global" key — depending on how the app reads them.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
How do I convert php.ini to JSON?
Paste your php.ini content and select "Basic (numbers only)" type mode. This preserves PHP-specific values like 2M, On, Off and 60s as strings while still converting numeric values like port numbers to integers.
How do I parse an INI file in Python?
Use configparser: import configparser, json; cfg = configparser.ConfigParser(); cfg.read('config.ini'); data = {s: dict(cfg[s]) for s in cfg.sections()}; print(json.dumps(data, indent=2)). Note: configparser returns all values as strings — use this tool for automatic type inference.
Is the INI to JSON converter free?
Yes, completely free. No file size limits, no account required.
Go up