INI to JSON Converter
Convert INI config to JSON and JSON back to INI in your browser. Sections, comments, and global keys are all handled. Your data stays local.
The INI to JSON Converter runs entirely in your browser. The INI and JSON config you paste is parsed locally and never leaves your device or is uploaded to ArrayKit.
Open the JSON Formatter
About INI to JSON
The INI to JSON Converter reads a classic INI config file and turns it into clean, structured JSON, then converts JSON straight back to INI. It understands [section] headers, key=value entries, section-less global keys at the top level, and comment lines that start with ';' or '#', which it quietly skips. Numbers and booleans are coerced by default so port=5432 becomes a real number and enabled=true becomes a real boolean, or you can keep every value as a string. Going the other way, top-level scalars become global keys and nested JSON objects become named [sections]. It is handy when you are migrating legacy tooling config, wiring INI settings into a JSON-based pipeline, or diffing two configs in a common shape. Everything runs on your device — your config never leaves the browser.
Features
- Two-way conversion: INI to JSON and JSON back to INI
- Parses [section] headers into nested JSON objects
- Keeps section-less keys as global top-level JSON entries
- Skips ';' and '#' comment lines automatically
- Optional type coercion turns numbers and booleans into real JSON values
- JSON objects become named [sections]; scalars become global keys
- Clear line-numbered errors for unclosed sections or malformed lines
- Runs entirely in your browser with nothing uploaded
How to use the INI to JSON
- Pick the INI → JSON direction (or switch to JSON → INI)
- Paste your INI config or JSON into the input box
- Toggle Coerce types if you want numbers and booleans instead of strings
- Copy the converted output or download it as a .json or .ini file
Example
Input
name = ArrayKit
[database]
host = localhost
port = 5432
enabled = true
Output
{
"name": "ArrayKit",
"database": {
"host": "localhost",
"port": 5432,
"enabled": true
}
}
A global key plus a [database] section become a top-level field and a nested object.
Common errors & troubleshooting
- A line reports 'Expected "key = value"'. — Every non-comment, non-section line must contain '=' (or ':'). Add the separator, or prefix the line with ';' to make it a comment.
- 'Unclosed section header' on a [section] line. — Add the missing ']' so the header reads like [database]. Section names cannot span multiple lines.
- port becomes the string "5432" instead of a number. — Turn on Coerce types so bare numeric and true/false values are parsed as real JSON numbers and booleans.
- JSON → INI reports it needs an object at the top level. — INI has no top-level array, so wrap your data in an object. A top-level array or primitive cannot map to sections and keys.
Frequently asked questions
- How does the converter map INI sections to JSON?
- Each [section] header becomes a nested JSON object keyed by the section name, and the key=value lines under it become that object's fields. Duplicate headers with the same name are merged into one object.
- What happens to keys that appear before any [section]?
- Keys written before the first section header are global. They are placed at the top level of the JSON object, alongside the section objects, so nothing is lost.
- Are ';' and '#' comments kept in the JSON output?
- No. Lines that start with ';' or '#' are treated as full-line comments and skipped during INI → JSON conversion, so they never appear in the JSON. Inline text after a value is kept as part of that value.
- How does JSON → INI decide what becomes a section?
- Top-level scalar values become global key=value lines emitted first, and each top-level nested object becomes a named [section]. Nested arrays or deeper objects are written as a JSON-encoded, quoted value.
- Can I stop the converter from turning values into numbers or booleans?
- Yes. Turn off Coerce types and every INI value is kept as a string, so port=5432 stays "5432" and enabled=true stays "true" in the JSON.
- Is my INI or JSON config uploaded to convert it?
- No. The INI to JSON Converter parses and rebuilds everything in your browser using local JavaScript. The config you paste never leaves your device and is not sent to ArrayKit.
Related tools
All ArrayKit tools