INI ↔ JSON Converter Online
Convert INI configuration files to JSON and JSON back to INI format in your browser.
When an INI ↔ JSON converter is the right tool
Use this page to turn a sectioned INI file into indented JSON, or a JSON object back into INI. Choose a direction, paste the source, and click Convert. It is a simple data converter: comments are dropped, and every INI value becomes a string. For TOML rather than INI, use TOML ↔ JSON.
Use cases
Inspecting an app config as JSON
Leave the direction on INI → JSON and Load Sample for a short general, database, and logging document. debug = false stays "false" in JSON, and 1.0.0 stays a string, not a number.
Writing INI from a JSON object
Switch to JSON → INI and paste a single object whose values are either scalars or one-level objects (sections). Deeper nesting is stringified as JSON on the value line, not as [section.sub].
How conversion works
INI → JSON walks each line: comments and blanks are skipped, [name] starts a section, and the first = splits a key and value. Keys before the first section land at the root. JSON → INI parses with JSON.parse, writes root scalars, then writes each object as a section. Switching direction clears the editors.
[general]
app_name = MyApp
version = 1.0.0
debug = false
{
"general": {
"app_name": "MyApp",
"version": "1.0.0",
"debug": "false"
}
}That string typing is expected on this converter. There is no option to emit booleans or numbers from INI.
What this tool does not do
It does not keep comments, interpolate environment variables, or build nested tables beyond one section level. It does not update live, and it does not upload anything. Pretty-print the JSON afterwards with JSON Formatter if you want a second look.
How to use INI ↔ JSON Converter
- Choose INI → JSON or JSON → INI. Switching tabs clears the input.
- Paste the source, or use Load Sample for a short example in the current direction.
- Click Convert, then Copy when the output looks right.
Frequently asked questions
How does INI → JSON work?
Each [section] becomes a JSON object. Keys inside a section become string values: debug = false is the string "false", and port = 5432 is "5432". Lines that start with ; or # are skipped, so comments do not appear in the JSON. Keys that appear before any section are placed at the JSON root. A line without an = is ignored. You have to click Convert.
How does JSON → INI work?
The input is parsed as JSON. Top-level scalars are written first as key = value. Each top-level object becomes a [section] whose nested scalars are written the same way. A nested object inside a section is written with JSON.stringify, not as a sub-section. A JSON array at the root is treated as an object with numeric keys (0 = …). A JSON array used as a section is written the same way.
Are comments, quotes, and types preserved?
Comments are dropped in both directions — they are not written back to INI. Surrounding single or double quotes on an INI value are stripped (the quote characters at the start and end are removed independently). There is no type inference and no interpolation of ${} or escape sequences. Duplicate keys in a section: the last value wins in the JSON object.
Do the results update as I type?
No. You have to click Convert. Switching INI → JSON or JSON → INI clears both editors. Load Sample pastes a short general/database/logging example for the current direction and clears the output. There is no Swap button. Invalid JSON shows the parser error and clears the output.
Is my data sent to a server?
No. Conversion runs in your browser. Closing the tab discards what you pasted. Do not paste configuration that contains secrets if you would not be comfortable with it sitting in memory on this device.
Related tools and guides
References
- There is no single INI standard. This page implements a small subset:
[sections],key = value, and whole-line comments starting with;or#. - Values are always strings on the INI → JSON path. If you need typed YAML or TOML, use the converters linked above.