Options
INI input
Drop the file to open it
JSON output
The JSON appears here as you type.

Paste an INI, CFG, or CONF file and the JSON appears next to it as you type. Sections become objects, numbers and true/false values become real JSON types, and anything the converter had to guess about is listed under the panes with its line number. Switch to JSON to INI to go the other way. Everything runs in your browser, so config files with passwords or API keys never leave your device.

How to convert INI to JSON

  1. Paste your INI text into the left pane, or click Open file and pick a .ini, .cfg, .conf, or .cnf file. You can also drag the file onto the pane.
  2. Read the JSON on the right. It updates on every keystroke.
  3. Check the list under the panes. It points out repeated keys, merged sections, unclosed quotes, and lines with no =. Click a line to jump to it.
  4. Change the options if the result isn't what your code expects, for example keeping every value as text or nesting [server.tls] as plain section names.
  5. Click Copy or Download .json.

How INI maps to JSON

INI has no official standard, so every converter makes choices. These are the defaults this one uses:

INIJSON
name = Demo before any sectionA top-level key: {"name": "Demo"}
[server] then port = 8080{"server": {"port": 8080}}
[server.tls]Nested: {"server": {"tls": {...}}}
[remote "origin"] (git style){"remote": {"origin": {...}}}
debug = falseA boolean: false
zip = 02134A string: "02134", so the leading zero survives
pass = "a;b""a;b", with the quotes removed and the semicolon kept
tags[] = a and tags[] = bA list: ["a", "b"]
key = with nothing after itAn empty string: ""
skip-networking with no =A flag: true
; comment or # commentDropped, or kept in a _comments list if you turn on Keep comments

What is an INI file?

An INI file is a plain-text settings file made of key = value lines grouped under [section] headers. The format comes from early Windows, where programs stored their settings in files like win.ini, and it's still everywhere: php.ini, MySQL's my.cnf, Python's setup.cfg and tox.ini, Git's .gitconfig, Windows desktop.ini, and the config files of countless games and desktop apps. The extensions .ini, .cfg, .conf, and .cnf usually mean the same format.

JSON is what most code and APIs expect, so converting an INI file is a common first step when you move settings into a JavaScript or Python app, a database, a cloud service, or a test fixture.

INI dialects the options handle

Different programs read INI files differently, and the options above match the common variations.

Dotted section names

Many tools treat [server.tls] as a child of [server]. Others, like PHP, use dots as part of an ordinary name, as in date.timezone. Turn off Nest dotted names to keep those names flat.

Repeated keys

Windows and most parsers keep the last value when a key appears twice. Git and some systemd-style files treat repeats as a list. Pick Keep last, Keep first, or Combine into a list.

Multi-line values

Python's configparser lets a value continue on indented lines, which setup.cfg uses for dependency lists. With Multi-line values on, those lines are joined with line breaks. A line only counts as a continuation when it's indented further than the key above it, so files that indent every key, like .gitconfig, still read normally.

Inline comments

Text after a semicolon is treated as a comment by default. The # character is left alone unless you choose After ; or #, because values like color = #ff6600 and title = Part #2 are common. Quoted values are never cut.

Value types

Whole numbers, decimals, and true/false become JSON numbers and booleans. PHP and MySQL files often use On/Off and yes/no, so choose Also yes/no, on/off, null for those. Values in quotes, numbers with leading zeros, and integers too large for JavaScript to hold exactly stay as strings. Choose Keep as text to make every value a string.

Converting JSON back to INI

Click JSON to INI to turn a JSON object into an INI file. If there's already a result on the right, it moves into the input so you can round-trip a file. Top-level values become global keys, objects become sections, and deeper objects become sections like [parent.child] or git-style [parent "child"]. Lists are written as key[] = value lines, repeated keys, or one comma-separated value, and text that would otherwise read as a number, a boolean, or a comment is put in quotes. INI can't hold everything JSON can, so lists of objects become numbered sections and anything deeper is written as a JSON string, with a note in the list for each case.

Frequently asked questions

Is my INI file uploaded anywhere?

No. The file is read and converted by JavaScript in your browser. Nothing is sent to a server, so it's safe to convert config files that contain passwords, database credentials, or API keys.

Why is one of my numbers still a string?

Values in quotes stay strings, and so do numbers with a leading zero, like ZIP codes and file permissions such as 0755, because turning them into numbers would drop the zero. Integers larger than 9,007,199,254,740,991 also stay strings, since JavaScript can't store them exactly. Check that Values isn't set to Keep as text.

What happens when a key appears twice?

By default the last value wins, the same as Windows and most INI parsers, and the repeat is listed under the panes with both line numbers. You can keep the first value instead, or combine every value into a JSON list.

Does it support nested sections?

Yes. Dotted headers like [server.tls] and git-style headers like [remote "origin"] become nested JSON objects. Dotted key names like db.host = localhost are nested the same way. Turn off Nest dotted names to keep the dots in the names instead.

Can it open INI files saved by Windows?

Yes. Many Windows programs save INI files as UTF-16, and the converter detects that from the file's byte order mark. It also reads UTF-8 with or without a BOM and falls back to Windows-1252 for older files.

How do I convert JSON to INI?

Click JSON to INI above the panes and paste your JSON. The top level has to be an object. Objects become sections, nested objects become subsections, and lists are written in the style you choose under Lists.

Does it handle multi-line values in setup.cfg?

Yes. With Multi-line values on, indented lines under a key are added to that key's value and separated by line breaks, which is how Python's configparser reads setup.cfg and tox.ini.

Are variables like ${section:key} or %(name)s filled in?

No. Interpolation rules differ between programs, so references are kept exactly as written. That way the JSON still matches the original file.

Our Full Text Tool Library

Flipper File