INI ↔ JSON Converter
Parses INI input section by section (with dotted section names becoming nested objects), infers numbers, booleans, and null from unquoted values, and respects quoted strings to keep them exact. The reverse direction writes a top-level object as the un-sectioned head, then emits each nested object as its own [section], flattening deeper levels with dotted names. Comments (; or #) are read on input but not preserved on output.
Dotted section names like [server.tls] become nested objects. Quoted values stay strings; bare numbers/booleans/null are inferred.
How to use
- Pick a direction (INI → JSON or JSON → INI).
- Paste your config on the left.
- Copy the result on the right. Switching direction feeds the current output back as input.
Frequently asked questions
- Why was my unquoted value turned into a number?
- INI has no native types, so the parser infers them: bare integers, floats, true/false, and null are converted. Wrap the value in "..." to keep it a string.
- Are comments preserved when going back to INI?
- No. JSON has no comment construct, so anything you read in is dropped before the round-trip back. Add comments by hand after exporting.
- The same key appears twice in my INI and one value disappeared. Why?
- A JSON object cannot hold two identical keys, so the conversion has to choose, and the last occurrence wins here. Some INI dialects deliberately repeat a key to express a list; those sections need converting by hand into an array, because nothing in the INI text says whether a repeat means a list or a mistake.
- Which INI dialect does this follow?
- There is no specification for INI, only conventions. This follows the common Windows-style one: [section] headers, key=value, semicolon or hash comments, and dotted section names for nesting. Dialects that separate with a colon, use indentation for structure, or allow values continued over several lines will not round-trip unchanged.
Related tools
JSON ↔ YAML Converter
Convert JSON to YAML or YAML to JSON — pick the indent and copy the result.
TOML ↔ JSON Converter
Convert between TOML (`Cargo.toml`, `pyproject.toml`, Hugo configs) and JSON — handles tables, array-of-tables, inline tables, typed scalars.
XML ↔ JSON Converter
Convert XML to JSON and back, with full attribute support, configurable attribute prefix and text key. Browser-native DOMParser handles namespaces, CDATA, comments.
Fixed-Width Text Parser to CSV / JSON
Split fixed-width / fixed-column text into fields by column widths and export as CSV or JSON, in your browser.
CSV → HTML / Markdown / JSON Table
Convert CSV to an HTML `<table>`, a Markdown table, or a JSON array of objects — auto-detects the delimiter.
JSON → SQL INSERT
Turn a JSON array of objects into INSERT statements — PostgreSQL, MySQL, SQLite, or ANSI quoting, with an optional ON CONFLICT upsert tail.