Overview
Convert an INI-format config file into JSON, or JSON into INI, with sections in square brackets mapping to nested JSON objects and top-level key=value pairs mapping to top-level JSON keys. Comments starting with ";" or "#" are recognized and skipped during INI → JSON, and "true"/"false"/numeric values are inferred to their JSON types rather than kept as plain strings, matching how most INI parsers behave in practice. INI has no native array or nested-section syntax, so JSON input with arrays or sections nested more than one level deep can’t convert back to INI - the tool flags this explicitly rather than silently producing invalid output. Useful for reading a legacy .ini config (PHP, Windows, older desktop apps) as JSON for scripting, or generating an .ini file from a JSON config object. Runs entirely client-side.
Best for: Reading a legacy .ini config file as JSON for scripting
How to use this tool
- Pick a direction. Switch between INI → JSON and JSON → INI with one click.
- Paste your input. Drop in an INI file or a JSON config object.
- Read the converted output. Sections become nested objects, comments are skipped, and types are inferred automatically.
- Swap and repeat. Use the swap button to feed the output straight back in as new input.
Why use this tool
Handles sections and comments
Recognizes [section] headers and ";"/"#" comment lines the way real INI parsers do.
Type inference
"true", "false", and numeric-looking values become their proper JSON types, not just strings.
Honest about INI’s limits
Flags JSON arrays or deeply nested objects explicitly rather than silently producing broken INI.
Nothing leaves your browser
Conversion happens entirely client-side - useful when the config contains real connection strings or credentials.
Frequently asked questions
INI has no native syntax for arrays or for sections nested more than one level deep. If your JSON has an array value or an object nested inside another nested object, flatten it first - the error message names the specific key that caused the problem.
No - comments in the original INI are discarded during INI → JSON, since JSON has no comment syntax to hold them, so converting JSON back to INI won’t restore any comments that were in the original file.
Any line matching "[name]" starts a new section, and every key=value line after it belongs to that section until the next "[name]" line or the end of the file. Key=value lines before the first section header become top-level JSON keys rather than nested ones.