INI to JSON
Parse an INI or .cfg file into JSON. Sections become nested objects, ; and # comments are ignored, quoted values are unwrapped, and numbers and booleans are recognised so you get real types instead of strings everywhere.
How to convert INI to JSON
- Paste your INI file, or drop it onto the input pane.
- Leave Value types on auto-detect for real numbers and booleans; switch to strings if your config is all identifiers.
- Keep Split dotted names on to turn
[db.primary]into{"db": {"primary": …}}, or off to keep"db.primary"as one literal key. - Copy or download the JSON.
What the parser accepts
- Comments — a line starting with
;or#, and a trailing comment after a value when preceded by whitespace. - Separators — both
=and:. - Quotes — a value wrapped in matching single or double quotes is unwrapped, so leading and trailing spaces are preserved.
- Keys before any section — kept at the root of the object.
- Duplicate keys — last one wins. INI implementations disagree here; some build a list instead.
Privacy
Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.
FAQ
Why is my port a number and not a string?
Auto type-detection. That is usually convenient, but if the value is really an identifier that happens to look numeric — a zip code, a version like 1.10 — switch Value types to strings to keep it verbatim.
Are multi-line values supported?
No. Line continuations are not standardised across INI implementations, so a value is whatever follows the separator on that line. For multi-line config, use YAML or TOML.
Can I convert to TOML instead?
Convert here first, then use JSON → TOML. TOML is the modern replacement for INI and keeps types.