Boneyard Tools

INI to JSON Converter

Paste an INI configuration and read structured JSON in the box beside it. Every [section] header becomes a nested object, comments and blank lines are skipped, and numeric or boolean values can be typed for you. The parse runs on your device, so no config file is uploaded.

How to convert INI to JSON

  1. Paste your INI text into the INI input box, or click Load sample to see the expected format.
  2. Group related keys under [section] headers so each one nests as an object in the result.
  3. Keep 'Parse values (numbers and booleans)' checked to type values like 5432 and true, or uncheck it to keep every value as a string.
  4. Read the formatted JSON in the JSON output box on the right.
  5. Click Copy to grab the JSON, or Download to save it as config.json.

Examples

A section becomes a nested object

[db]
host=localhost
port=5432
; comment
ssl=true
{
  "db": {
    "host": "localhost",
    "port": 5432,
    "ssl": true
  }
}

Keys before any header stay at the top level

name = boneyard
version = 2
{
  "name": "boneyard",
  "version": 2
}

Colon separators and quoted values both work

[cache]
driver: "redis"
ttl: 300
{
  "cache": {
    "driver": "redis",
    "ttl": 300
  }
}

Frequently asked questions

How are sections handled?

Each [section] header becomes a nested object in the JSON, and every key after it nests inside that object until the next header. Keys that appear before any section land at the top level of the output.

What happens to comments and blank lines?

Lines that start with a semicolon or a hash are treated as comments and dropped, and empty lines are ignored. Only real key and value pairs and section headers make it into the JSON.

Are numbers and booleans converted to real types?

With 'Parse values' on, the words true and false become booleans and clean numeric strings like 5432 or 3.14 become numbers. Turn the option off to keep every value as a plain string, which is safer for things like zip codes or version tags that must stay text.

Does it accept key: value as well as key=value?

Yes. Both the equals sign and the colon work as separators, and the first one that appears on a line is used. That means a value can safely contain the other character, so a URL after an equals sign keeps its own colons intact.

Are quotes around values removed?

A single matching pair of surrounding double or single quotes is stripped, so driver = "redis" becomes redis. Quotes inside the value are left alone, and this lets you wrap a value that has leading or trailing spaces you want to keep.

What if a key or a section appears twice?

For a repeated key the last value wins. A section header that appears more than once is merged into the same object rather than replaced, so later keys are added alongside the earlier ones.

Does it support nested subsections like [a.b]?

No. INI has only one level of sections, so a header written as [a.b] becomes a single top-level key named a.b rather than an object b inside an object a. If you need deep nesting, restructure the data as JSON or YAML.

What happens if a line is malformed?

A section header missing its closing bracket, a line with no equals or colon, or a line with an empty key raises an error that is shown in red below the input. Fix or remove that line and the JSON reappears.

Is my INI file uploaded anywhere?

No. The conversion runs entirely in your browser using client-side JavaScript, so your configuration never leaves your device and nothing is stored on a server.

Learn more

Related tools