INI and JSON converter
Move single-line INI configuration to a structured JSON document, or rebuild INI from string values.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Keep global assignments separate from named sections. Convert device or application settings locally, then inspect the complete values before downloading.
How to use this tool
- Choose INI to JSON or JSON to INI, then paste the input or open a UTF-8 file.
- For JSON input, use global and sections string maps. Resolve repeated names and unsupported multiline values before running.
- Check the section, key and value preview. Copy the full result or download the JSON/INI file; keep the original configuration.
Supported inputs and limits
One UTF-8 file or pasted input, at most 1 MiB and 50,000 physical lines. When a file is selected it takes precedence; remove it to process pasted input. The page previews up to 200 assignments; the download contains the complete result.
Supports single-line key=value assignments, [section] headings and whole-line # or ; comments. Spaces and tabs around names and values are trimmed. Quotes, backslashes, extra equals signs and inline #/; remain literal text. Repeated sections and duplicate keys within a section are rejected.
The JSON structure is {"global":{...},"sections":{"section":{...}}}. All values must be strings. Empty sections are kept. Comments and original spacing are omitted; no DEFAULT inheritance, variable expansion or multiline assignments.
JSON to INI rejects names or values that cannot survive this syntax, including line breaks and leading/trailing spaces in values. Other INI dialects may interpret the exported file differently; check it in the receiving application.
Worked example
Example input
version=01 [Device:1] path=C:\Devices\screen.xml label=
Example options
{"direction": "to-json"}Example output
{
"global": {
"version": "01"
},
"sections": {
"Device:1": {
"path": "C:\\Devices\\screen.xml",
"label": ""
}
}
}When something does not work
Check the selected direction, section brackets and key=value lines. Give every key and section a unique name; for reverse conversion use only string values that fit on one line. Remove a selected file before switching to pasted input.
Frequently asked questions
Why are global keys and sections separate?
A global key may have the same name as a section. Separate maps keep both without overwriting either, and retain sections that contain no assignments.
Will it keep comments or expand variables?
No. It transfers configuration values, omits comments and spacing, and leaves references such as ${HOME} as literal strings.
Why is a value with spaces rejected when exporting?
The supported INI syntax trims spaces and tabs at value boundaries. Rejecting an unrepresentable value avoids silently changing it.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.