Dev · 108 tools · nothing uploads

INI <-> JSON

Convert an INI file to JSON or back, with sections becoming nested objects and ; or # comment lines dropped. Runs on your device, nothing is uploaded.

Input

Options

live

INI <-> JSON turns an INI file into JSON, mapping each [section] to a nested object and dropping any ; or # comment line. It also runs that conversion in reverse from a JSON object. A bare true, false, or numeric-looking value on the INI side gets coerced into a boolean or number. Converting back refuses a top-level array or scalar.

Questions

How are sections handled?

Each [section] header becomes a nested object under that name in the JSON output.

Are values type-coerced?

Yes, a bare true or false becomes a boolean and a numeric-looking value becomes a number; everything else stays a string.

What comment styles are supported?

Lines starting with ; or #, either of which is dropped entirely.

What does json-to-ini require?

A JSON object at the top level; an array or a scalar there is refused.

What happens on a malformed INI line?

A line with no = is refused, naming the exact line.

Related Dev tools

n→nJSON format / validateParse, validate and pretty-print JSON, with a clear parse-error message if it is broken.Runs on each file you dropn→nJSON sort / minify / escapeSort object keys, minify to one line, or escape/unescape JSON for embedding inside another string.Runs on each file you dropn→nJSONPath queryQuery JSON with a JSONPath expression: dot/bracket access, wildcards (*), recursive descent (..). No filter expressions (?()) or slices; those need a full JSONPath engine this build does not have.Runs on each file you dropn→nJSON Schema generatorInfer a draft-07 JSON Schema from an example JSON document. Every observed key is marked required, arrays are typed to accept every observed element.Runs on each file you dropn→nJSON to TypeScriptJSON to TypeScript. Infers types from an example JSON document. Nested objects become named types by their key; mixed-type arrays fall back to a broad/any type.Runs on each file you dropn→nJSON to GoJSON to Go. Infers types from an example JSON document. Nested objects become named types by their key; mixed-type arrays fall back to a broad/any type.Runs on each file you dropn→nJSON to RustJSON to Rust. Infers types from an example JSON document. Nested objects become named types by their key; mixed-type arrays fall back to a broad/any type.Runs on each file you dropn→nJSON ↔ CSVConvert a flat JSON array of objects to CSV and back. CSV has no type system: JSON->CSV renders numbers/booleans/null as text and CSV->JSON always comes back as strings. A nested object or array field is refused by name rather than silently flattened. CSV parsing is fully quote-aware, embedded newlines included; a file with an unterminated quote is refused rather than guessed at.Runs on each file you drop