Skip to main content

INI to JSON Converter

New

Convert classic INI configuration file syntax (sections, key=value pairs, comments) into structured JSON, with automatic type coercion for booleans and numbers.

inijsonconfigconvertparser
Read the guide
Shortcuts:⌘ KSearch

Lines starting with ; or # are treated as comments. Section headers like [database] become nested JSON objects; keys before any section header are placed at the top level. Values are auto-typed: true/false become booleans, numeric strings become numbers, and everything else stays a string.

Continue with:

Frequently Asked Questions

What INI syntax does this tool support?

Section headers in square brackets (like `[database]`), `key = value` pairs, and comment lines starting with `;` or `#` — the most common subset of INI syntax found in real-world config files across many languages and tools.

How does automatic type coercion work?

The string `true` or `false` (case-insensitive) becomes a JSON boolean, any value that parses as a valid number becomes a JSON number, and everything else stays a string — quoted values (single or double quotes) have their surrounding quotes stripped.

What happens to keys that appear before any section header?

They're placed directly at the top level of the resulting JSON object, rather than nested inside a section — this matches how most INI parsers treat a file's "global" or "default" section.

Does this tool support nested sub-sections like `[section.subsection]`?

Each bracketed header is currently treated as a single flat section name rather than being split on dots into nested objects, so `[server.database]` becomes one top-level key literally named "server.database" rather than a nested `server.database` object.

Is my config data sent anywhere when I use this converter?

No — parsing happens entirely in your browser using a self-contained line-based parser; nothing is uploaded or sent to a server.

Related Tools