INI Converter
Move configuration between INI syntax and JSON. Parse INI into a nested JSON object (sections become objects, values are typed as booleans, integers, floats, or strings), or generate standard INI from JSON with sections, dotted nested sections, and repeated dotted keys for arrays. Great for editing .ini, .cfg and similar config files in a structured editor.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Both directions of an INI conversion
In the default INI → JSON direction the pasted configuration is parsed into a nested object: each [section] header becomes an object, keys inside it become its members, and standalone keys before any section land at the top level. The result is pretty-printed JSON with two-space indentation. The JSON → INI direction takes an object and emits a conventional INI file, so you can round-trip a config through a structured editor and write it back in the format the program reads.
How values are typed
Parsing guesses a type for every value so the JSON is useful rather than a wall of strings: true and false become booleans, whole numbers become integers, decimal and exponential forms become floats, and anything else stays a string. A key written without an equals sign becomes a bare boolean true, which matches the free-standing flag style some INI dialects use. Nothing is quoted on the way out, so the JSON reads naturally.
Sections, nesting and arrays on the way back
JSON has no notion of sections, so the writer maps them: a top-level scalar becomes a root key, an object becomes a [section], and an object inside an object becomes a dotted header such as [app.database]. Arrays have no INI equivalent either, so each element is written as a repeated dotted key — entry.0, entry.1 — which is the pattern most INI readers can reconstruct. Keys keep the insertion order of the JSON object.
Comments, quoting and other limits
Lines beginning with a semicolon or a hash and blank lines are skipped when parsing, and no comments are ever written back, so a round trip through INI loses them. The first equals sign on a line separates key from value, which means a value may itself contain equals signs; newlines inside a JSON string are flattened to spaces because INI has no multiline value syntax. The whole conversion runs on your device — the configuration you paste is never uploaded.
Questions
How are INI values typed in JSON?
true/false become booleans, integer-looking values become numbers, decimal or exponential values become floats, and everything else stays a string. Keys without an equals sign become boolean true.
What does the JSON to INI direction produce?
Top-level scalars become root keys, objects become [section] blocks, nested objects become dotted sections like [app.database], and arrays become repeated dotted keys (entry.0 = ...). Keys are preserved in insertion order.
How are comments handled?
Lines starting with ; or # and blank lines are skipped while parsing. When generating INI, comments are not emitted.
What about values containing equals signs or newlines?
The first equals on a line splits key from value, so values may contain =. Newlines inside JSON string values are converted to spaces when writing INI, since INI has no multiline value syntax.
Related tools
See categoryTOML ⇄ JSON Converter
Parse TOML into JSON, or serialize JSON back to TOML.
YAML to JSON
Convert YAML to JSON locally, with indent choice and optional key sorting.
JSON to YAML
Convert JSON to YAML on your device, with a 2- or 4-space indent.
.env <-> JSON
Parse a .env file into JSON, or turn a JSON object into .env text. Runs entirely on your device.