INI ↔ JSON Converter
Convert INI text to JSON with separate global and section maps. Preserve repeated keys as arrays and keep all values as strings.
How to use
The JSON model is {"global":{...},"sections":{...}}. Values stay strings, so port=8080 becomes "8080" rather than a number. Repeated keys become arrays in their original order; exporting those arrays repeats the INI key.
Supported syntax includes [sections], = or : separators, # or ; comments and JSON-style double-quoted strings. Unquoted inline comments require preceding whitespace. Section names containing dots are literal and are not expanded.
Behavior and limits
INI has dialect differences. This tool’s quoted-string rules may differ from Windows or a specific framework. JSON export requires the documented envelope and string or non-empty string-array values. Comments and source layout are normalized; input is limited to 200,000 characters.
Questions & answers
Why are global keys separate from sections?
This avoids collisions when a global key and a section have the same name and preserves repeated values without overwriting them.
Is my input sent to a server?
No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Compare string types, escapes, duplicates, continuations and colliding sections and reject unrepresentable inputs.
- Comparison reference
- Explicit configuration fixtures and expected structures; the formats are not claimed to have identical semantics.
- Verification scope
- These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
-
data-tools.test.js
- INI conversion separates colliding globals/sections and preserves duplicate string values
- INI export rejects section-looking key names instead of producing an unreadable round trip
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.