Dev TooloraLocal dev tools

> Formatters

INI Converter

Convert INI to JSON and JSON to INI locally. Sections become objects, dotted section names nest, and big integers stay exact.

Runs locallyWorks offline
Back to results
Input

Source data

Direction
INI to JSON only. Turns true, false, plain integers and plain decimals into JSON types; everything else, such as 0012 or 1e5, stays a string.
Output

Result

Your result will appear here.

Tool guide

About this tool.

INI to JSON turns each [section] into an object and each key=value line into a string. A dotted section name such as [db.replica] nests inside [db]. Keys before the first section sit at the top level. Lines starting with ; or # are comments; a ; inside a value is part of the value.

JSON to INI accepts a root object with plain values at the top and one level of sections. Deeper objects, arrays and null are rejected with the key named. Values with leading or trailing spaces, or starting with a quote, are written in double quotes so they read back unchanged. A value or key containing a newline cannot be written and is an error.

Choose a direction with INI → JSON or JSON → INI.

Paste INI or JSON, or pick a sample.

Turn on Typed values to get JSON numbers and booleans from INI.

Copy the result or save it as a .json or .ini file.

  • top=1 [db] host = x → {"db": {"host": "x"}, "top": "1"}.
  • [db.replica] port=5432 → {"db": {"replica": {"port": "5432"}}}.
  • With Typed values: port=5432 and debug=true → {"port": 5432, "debug": true}.
  • {"a": 1, "s": {"k": "v"}} → a=1, a blank line, [s], k=v.

  • Processing is local; nothing is uploaded.
  • Limits: 5,000,000 characters, 100,000 lines and 100 levels of section nesting.
  • INI has no standard: this converter reads key=value pairs, [sections], dotted section nesting and double-quoted keys and values. : separators and line continuations are not supported.
  • JSON to INI keeps number spelling and big integers exact, writes top-level keys before sections and does not keep key order across that split.
  • A UTF-8 byte order mark at the start is ignored, and CRLF line endings are accepted.

FAQ

Questions about INI Converter

Are numbers converted?

By default every value is a string, because INI has no types. Turn on Typed values to convert true, false, plain integers and plain decimals. Text such as 0012, 1e5 or .5, integers beyond the safe range and quoted values stay strings.

Are inline comments removed?

No. Comments are only recognized at the start of a line. In a = b ; note the value is "b ; note".

What happens to repeated sections and keys?

Yes. A repeated section name adds to the same object. A key repeated in the same section is an error with its line number. A key repeated in JSON input keeps its last value, as JSON.parse does, and the summary names the key and line.

Why does JSON to INI reject my nested object?

JSON to INI writes at most two object levels, so a nested result from dotted sections such as [db.replica] has to be flattened before it can be written back.

What counts as invalid INI?

A line that is neither a key=value pair nor a [section] header, and a header without its closing bracket, are errors that name the line.

Continue with

JSON ↔ TOML ConverterConvert JSON to TOML sections or inline tables and TOML back to JSON, with exact 64-bit integers, dates kept as strings and no silently dropped nulls.JSON FormatFormat, minify or validate JSON without rounding numbers, rewriting strings or dropping duplicate keys.Properties ConverterConvert Java .properties to JSON or YAML and back locally. Dotted keys nest, escapes and line continuations are read as java.util.Properties reads them.