INI to JSON Converter
Convert INI configuration files to JSON format with section nesting and value type detection.
INI to JSON
INI is a plain-text configuration format built from sections and key-value pairs. A section header sits in square brackets, such as [database], and the settings that follow belong to it. It was popularised on Windows — the .ini extension originally stood for “initialisation” — and it is still used by countless cross-platform tools because it is trivial to read and edit by hand.
JSON (JavaScript Object Notation) is a structured, hierarchical format that maps naturally onto objects and arrays. It is the lingua franca of web APIs, modern configuration files, and most programming languages. Converting INI to JSON lets you feed legacy configuration into a JSON-based pipeline, compare two configs as structured data, or load INI settings into a JavaScript application.
This converter parses the INI text in your browser, nests dotted sections such as [database.pool] into nested JSON objects, and detects value types automatically. The result is formatted with two-space indentation so it is immediately readable.
How values are converted
- Booleans —
true,yes, andonbecometrue;false,no, andoffbecomefalse. - Null —
null,nil, andnonebecome JSONnull. - Numbers — numeric values such as
100or30.5become JSON numbers. - Strings — quoted values are unquoted, and anything else is kept as a string.
- Sections — each
[section]becomes an object, and dotted names create nested objects.
- Paste INI — Paste or type INI configuration in the input area.
- Auto-convert — The JSON output updates automatically. Sections are nested, values are auto-detected as strings, numbers, or booleans.
- Copy result — Click the Copy button to copy the JSON output to your clipboard.
- Use the JSON — Paste the output into your config file, API request, or code. The formatting is already valid JSON.
app_name = "MyApp"
version = 1.0.0
debug = false
max_connections = 100
[database]
host = "localhost"
port = 5432
[database.pool]
min = 2
timeout = 30.5
{
"app_name": "MyApp",
"version": "1.0.0",
"debug": false,
"max_connections": 100,
"database": {
"host": "localhost",
"port": 5432,
"pool": {
"min": 2,
"timeout": 30.5
}
}
}
Notice how version = 1.0.0 stays a string because it is not a valid number, while port = 5432 becomes a JSON number. The dotted section [database.pool] is nested inside the database object.
- Quoted strings keep their content — wrap a value in single or double quotes when you want it to stay a string even if it looks numeric.
- Comments are ignored — lines beginning with
;or#are treated as comments and are not carried into the JSON. A;or#inside a quoted string is kept as-is. - Duplicate keys overwrite — if the same key appears twice in a section, the last value wins, exactly as a JavaScript object would behave.
- Keys without an equals sign are skipped — every setting must use the
key = valueform. - Array-style keys are not expanded — a key such as
items[]is kept literally rather than being turned into a JSON array. - Everything is local — conversion happens in your browser, so sensitive configuration never leaves your machine.
Is my data sent to a server?
No. All processing happens 100% client-side in your browser. Your data never leaves your device, which makes the tool safe for sensitive configuration files.
What INI features are supported?
Sections, dotted subsections, key-value pairs, comments starting with ; or #, single- and double-quoted strings, and automatic type detection for numbers, booleans, and null.
What is INI format used for?
INI files are commonly used for application configuration on Windows and in many cross-platform tools. They are simple to read and edit manually, which is why they have stayed popular for decades.
How are sections converted?
Each [section] becomes a JSON object. Dotted names such as [database.pool] create nested objects, so [database] then [database.pool] produces a pool object inside the database object.
How does the converter decide between a number and a string?
A value becomes a number only when the whole value parses as one, such as 100 or 30.5. A value like 1.0.0 is not a valid number, so it stays a string. Wrap a numeric-looking value in quotes to force it to stay a string.
Are comments preserved in the JSON output?
No. JSON has no comment syntax, so INI comments are removed during conversion. Keep your original INI file if you need to preserve comments.
What happens to duplicate keys?
The last value for a key wins, because the parser builds a JavaScript object and later assignments overwrite earlier ones. Remove duplicates before converting if you need to keep both values.
Does it support array values?
Not automatically. Keys written as items[] are kept literally rather than expanded into JSON arrays, since JSON arrays have no direct equivalent in the INI format.