Skip to content

INI to JSON

Convert simple INI sections and string values into explicit JSON locally.

INI → JSON48 characters
Paste configuration text. The live preview stays inert and is limited for responsiveness.
JSON previewReady
{
  "name": "Toolbox",
  "server": {
    "host": "localhost",
    "port": "3000"
  }
}
Processed on your device

How it works & useful details

INI import rules

Sections create one object level. Lines beginning with ; or # are comments, and both key=value and key: value are accepted. Repeated sections and duplicate keys are flagged.

INI values are always exported as strings; type conversion would be ambiguous. Dotted section/key names are kept as literal names.

Private, bounded processing

This workspace parses text only in your browser. It never opens links, requests external entities, runs pasted configuration, or saves your document. Input is limited to 500,000 characters; conversion output is limited to 1,000,000 characters.

About this tool

INI to JSON converts simple INI sections, keys, and values into explicit JSON. It is useful when a legacy configuration file needs to be consumed by JavaScript, a script, or an API that expects JSON.

Values are kept as strings so nothing is silently reinterpreted: a value like 0755 or true stays exactly as written. The conversion is bounded, runs locally, and never resolves includes or environment variables.

How to use it

  1. Paste the INI file contents.
  2. Run the conversion to see sections mapped to JSON objects.
  3. Check warnings about duplicate keys or unsupported syntax.
  4. Copy the formatted JSON or download it.

Worked example

; app settings
name=Toolbox
[server]
host=localhost
port=3000
debug: false

converts to

{
  "name": "Toolbox",
  "server": {
    "host": "localhost",
    "port": "3000",
    "debug": "false"
  }
}

The comment line is dropped. Keys before the first section stay at the top level, and each [section] becomes a nested object. Both = and : work as separators.

Why every value stays a string

INI has no formal specification. PHP, Python's configparser, Windows, and Git config each read values differently. "3000" might be a port number or a product code, and "no", "off", and "0" mean false to some readers but not to others. Rather than guess, the converter keeps the exact text, so nothing is changed silently. Convert types in the program that reads the JSON, where the meaning of each setting is known.

Typical sources of INI files include php.ini, legacy Windows application settings, systemd-style units, .editorconfig, and many game and desktop app configurations. Repeated sections and duplicate keys are flagged, because parsers disagree about whether the first or last value wins.

Frequently asked questions

Are numbers and booleans converted to JSON types?

No. Values stay strings so leading zeros and unit-like text are preserved; convert types deliberately in your own code.

How are duplicate keys handled?

Duplicates are reported and the later value wins, matching typical INI parser behavior.

What is the limit?

Up to 500,000 characters of input.

Are dotted section names like [server.tls] nested?

No. They are kept as the literal key "server.tls", since only some INI dialects treat dots as nesting.