ToolConvoyToolConvoyv2.6
DATA

INI to JSON — Convert INI Config Files to JSON

Convert INI configuration files to JSON. Auto-detects sections, parses value types, runs entirely in your browser. No uploads, no limits.

● LOCAL · ZERO-COPY PIPELINE0 network requests from tools since page load

INI to JSON

Convert INI configuration files to JSON format. Auto-detects sections, numbers, and booleans. Works entirely in your browser.

INI files are the oldest configuration format still in widespread use. They predate JSON by decades — the Windows registry exported to text, PHP’s configuration, Python’s configparser library, Git’s config file, MySQL’s option files, and dozens of older application config formats all use a flavor of INI. The format is intentionally minimal: a [section] header introduces a named group, key-value pairs (key = value) follow, and comments use ; or #. There is no standard for nested sections, no type system, and no list syntax — every value is text, and structure is implied by convention.

The conversion to JSON is what gives an INI file a second life. The format itself is fine for human editing — a 50-line INI is easier to read and modify than the equivalent JSON — but the moment the data needs to flow into a web app, a configuration management system, or a data pipeline, JSON is the lingua franca. The conversion is mostly mechanical: section headers become JSON keys, key-value pairs become JSON properties, and the type inference (numbers, booleans, null) is the only place where judgment is required. The tool infers types conservatively — a column with even one non-numeric value becomes all strings — and exposes a ‘quote all as strings’ toggle for cases where the inference would be wrong (ZIP codes, phone numbers, IDs that look numeric but should stay as text).

For a final hand-off: if the destination is a JavaScript app or a Node.js config loader, the JSON output is paste-compatible with any standard parser. If the destination is a typed language (TypeScript, Go, Rust), feed the JSON through the type-generator tools to produce matching types. If the destination is another config format, the JSON is a useful intermediate — TOML or YAML converters accept JSON-derived objects and produce correctly typed output. The INI format itself is rarely the right destination — keep the JSON and re-export to TOML or YAML if the project requires it.

Advertisement

How to use

  1. Paste your INI content

    Drop the INI text into the input area, or load a .ini file via the file picker. Sections are detected from `[section]` headers; key-value pairs are parsed from each line under a section.

  2. Pick an output shape

    Choose between nested object (sections become top-level keys), flat with prefixed keys (`section.key`), or array of sections (each section is one item in an array). Default is nested for INI files with distinct sections.

  3. Copy or download the JSON

    Copy the JSON to your clipboard, or download as a .json file. Type inference converts numbers, booleans, and null automatically; toggle 'all strings' to disable inference and preserve every value as a JSON string.

Frequently asked

How are sections represented in the output?

By default each `[section]` header becomes a top-level key in the JSON object, and the key-value pairs under that section become the value. An INI file with `[database]` and `[server]` sections becomes `{ database: {...}, server: {...} }`. The flat output prefixes each key with the section name (`database.host`).

What happens to keys outside any section?

Keys before the first `[section]` header are collected into a `_` or `default` key in the output. This preserves the data — INI files in the wild sometimes have headerless keys at the top, and dropping them silently would corrupt the config.

How are repeated keys handled?

By default the last value wins, matching the behavior of most INI parsers. Toggle 'array of values' to keep every value for repeated keys as a JSON array — useful when the INI source uses repeated keys as a list (`item = a`, `item = b`, `item = c`).

Does it support comments and blank lines?

Yes — lines starting with `;` or `#` are treated as comments and stripped. Blank lines are ignored. Multi-line values using line continuation (a backslash at the end of a line) are joined into a single value before type inference.

Are nested sections supported?

No — INI has no native syntax for nested sections. The tool treats `[a.b]` as a section literally named `a.b`, not as a nested `a` containing `b`. For hierarchical config that needs nesting, TOML or YAML is the right source format.

Limitations

  • No native nestingINI does not have a syntax for nested sections. A section named `[database.connection]` is a flat name, not a hierarchy. For config that needs nesting, start from TOML or YAML where the syntax supports it natively.
  • Type inference is conservativeNumeric, boolean, and null values are inferred automatically. A column where every value is a number becomes JSON numbers; a column with one non-numeric value becomes all strings. Toggle 'all strings' to disable inference.
  • No INI dialect auto-detectionThe tool handles the standard INI format. Vendor dialects with custom features (PHP's array syntax, Windows registry-style escaping, multi-line values with specific markers) may not parse correctly. Check the output for stray values if the source is non-standard.

Platform notes

macOS
TextEdit and VS Code both save .ini files as plain text. The browser tool is the right pick for INI files pasted from a chat, an email, or a documentation page where retyping into a Python `configparser` session is impractical.
Windows
Notepad saves INI files with Windows-1252 encoding by default. Save as UTF-8 first if the file contains non-ASCII characters to avoid mojibake in the converted JSON.
Linux
For command-line work, `python3 -c 'from configparser import ConfigParser; ...'` or `crudini --format json file.ini` does the conversion. The browser tool is the right pick for INI content pasted from a chat or email.
Web
Runs entirely client-side. Works offline once the page has loaded. Useful for restricted environments where command-line tools or a Python install are not available.
Advertisement
Advertisement