LazyTools

🔒 Every tool runs in your browser, the files and values you enter are never uploaded to any server. How it works

🗄️ JSON to INI Converter

Paste a JSON object and get an INI file: scalar properties go at the top and each nested object becomes a [section].

top-level objects → [sections]

Rate this tool:
Anonymous, no account, no identifier

How the json to ini converter works

The tool parses your JSON and writes INI: top-level scalar properties (strings, numbers, booleans) are emitted first as key=value lines, then each property whose value is an object becomes an [section] header followed by that object's key=value pairs. Arrays are joined with commas, since INI has no native array syntax. The JSON must be an object at the top level, because an INI file is a set of key/value pairs. The ordering is deliberate: because every line after a [section] header belongs to that section, all top-level scalars must be written before the first header, or they would be misread as part of it. So {"title":"LazyTools","owner":{"name":"Ada"}} produces title = LazyTools first, then the [owner] block.

This is the inverse of the INI-to-JSON tool and is useful when a tool or legacy app expects an INI file but you're generating configuration as JSON. INI only models one level of sections, so deeply nested JSON is flattened at that boundary, keep the structure to two levels for a clean result. The conversion runs entirely in your browser.

Frequently asked questions

How do I convert JSON to an INI file?

Paste a JSON object or load a .json file and the tool outputs INI text. Scalar properties are written at the top and each nested object becomes a [section]; copy or download the result as a .ini file.

Why must the JSON be an object?

An INI file is a collection of key/value pairs (optionally grouped into sections), so it needs an object at the top level. A top-level array, string or number has no INI representation and the tool will tell you.

How are nested objects and arrays handled?

A nested object becomes an [section] with its keys inside. Arrays are written as comma-separated values because INI has no standard array syntax. Objects nested more than one level deep can't map cleanly to INI's two-level model.

Does it preserve types?

INI is textual, so numbers and booleans are written as their text form (port=8080, debug=true). When you read the INI back you'll get strings, which is normal for the format.

How is an array like ["a","b"] written?

As a single comma-joined value, key = a,b, because INI has no standard array syntax. If your consumer expects a different convention (repeated keys, or semicolon separation), adjust the output by hand after converting.

Is the result a valid round-trip with the INI-to-JSON tool?

For flat and one-level-sectioned data, yes, converting back reproduces the same keys and sections, though values return as strings since INI is untyped. Arrays and deeply nested objects do not round-trip cleanly, because INI cannot represent them natively.

Is my JSON uploaded?

No, the conversion happens locally in your browser and nothing is transmitted.

Related file converters