INI to JSON Converter

Paste an INI file to get JSON. Sections become objects, keys become properties. You can also convert JSON back to INI.

Runs entirely in your browser. Nothing you enter is sent or stored.

How to use

  1. Choose INI → JSON or JSON → INI.
  2. Paste your INI or JSON into the input box.
  3. Optionally lowercase names (iniparser-compatible) or convert numbers and true/false.
  4. Copy or download the result.

Parsing follows the rules of the C iniparser library: lines are trimmed, lines starting with # or ; are comments, [name] starts a section, and key = value sets a value. A value in "double" or 'single' quotes is taken as-is; an unquoted value ends at the first ; or #. A line ending with a backslash continues on the next line. Keys before the first section become top-level JSON properties.

Frequently asked questions

Are INI comments supported?

Yes. Lines starting with ; or # are skipped. An unquoted value also ends at ; or #, so put values that contain these characters in quotes.

Why are all my values strings?

INI has no data types, so values are kept as strings by default. Turn on number and true/false conversion to get JSON numbers and booleans.

What happens with a syntax error?

If any line is neither a comment, a section nor key = value, nothing is converted and the line number of each error is shown, just like iniparser refuses to load the file.

Related tools