INI to JSON Converter – Convert INI Config Files to JSON Free Online

Use the free INI to JSON Converter below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.

What INI Files Are, and Why They Still Matter

INI files are one of the oldest config formats still in daily use. A section header in square brackets, then key and value pairs, one per line, with semicolons or hash signs marking comments. Windows programs used them for decades, and they never really went away: game settings, PHP configuration, Python projects, and countless small tools still read INI files today. They are simple enough to edit by hand, which is both their charm and their limit.

JSON is what modern applications and APIs expect. When an old INI config needs to feed a new system, or when you want to process settings with a script that speaks JSON, conversion is the step in between. This tool does it in your browser, with nothing uploaded, turning sections into nested objects and keys into JSON properties.

How to Use the Converter

Paste INI into the input box and press Convert to JSON. Choose an indent of two or four spaces. The output appears below, ready to copy or download. Comments are skipped, because JSON has no comments. Keys before any section header land at the top level. Dotted section names like [database.main] become nested objects, which matches how most INI readers interpret them.

Try the sample. It has an owner section, a server section, and a repeated tag key. Watch the repeated key become a JSON list: the converter does not silently drop the first value, which is what a careless converter would do. Keeping both values is the honest behaviour, and it matches how the setting was written.

How INI Details Map to JSON

Sections become nested objects, keys become properties, and values become strings. That last point matters: INI has no types, so port = 8080 becomes the string “8080” in JSON, not the number 8080. If your receiving system needs a number, convert it there, where the meaning of each key is known. Guessing types in the converter would be wrong as often as right: a version like 1.10 is not the number 1.1, and a code like 007 is not the number 7.

Quoted values lose their quotes, so name = “Ada Lovelace” becomes “Ada Lovelace”. Inline comments after a value are stripped when they are separated by a semicolon or by a space and a hash, but a hash inside a value, like a colour code, is kept. Both equals signs and colons work as separators, because different INI dialects use different ones, though equals is far more common. A line with neither separator is reported as an error with its line number, instead of being silently skipped.

Common INI Pitfalls the Converter Surfaces

Duplicate sections are a frequent surprise. Some INI readers merge them, others take the last one, and the result depends on the reader. This converter merges keys from repeated sections into one object, and repeated keys become lists, so nothing is lost silently. A section header missing its closing bracket is reported as an error rather than guessed at. Keys with no value are kept as empty strings, which preserves the fact that the key was present.

Case sensitivity is another trap. INI readers disagree about whether Server and server are the same section. This converter treats them as different, which is the literal reading of the file. If your application treats them as the same, normalise the case before converting, or handle it in the receiving system.

Frequently Asked Questions

Why are numbers strings in the output? Because INI has no number type. Every value is text, and converting text to numbers requires knowing what each key means, which only your application knows.

What happens to comments? They are dropped, because JSON cannot represent them. Keep your original INI file if the comments document why settings exist.

Is my file uploaded? No. Conversion runs entirely in your browser on your own device.

Paste your INI above and get a JSON version that modern tools can read.

Related tools

1 thought on “INI to JSON Converter – Convert INI Config Files to JSON Free Online”

  1. Pingback: TSV to JSON Converter - Convert Tab-Separated Data to JSON Free

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top