Skip to content
uencoder
TASK

Convert INI configuration files to JSON

INI files use sections in brackets and key=value pairs. Convert to JSON for programmatic access, validation, and interoperability with modern tools.

  1. 1

    INI format: [section] headers, key=value pairs, comments with ; or #. It is a legacy configuration format common in Windows and Python. Converting to JSON enables schema validation, programmatic modification, and use with modern tools that expect JSON.

  2. 2
    TOML Converter →

    Parse the INI file (INI is a subset of TOML's syntax) and convert to JSON. Sections become nested objects, key=value pairs become object properties. Quoted values are parsed as strings; unquoted numbers are parsed as numbers.

  3. 3
    JSON Formatter →

    Format the converted JSON for readability. INI files often have inconsistent spacing and quoting — formatting normalizes the output. Verify that sections and keys were correctly mapped to the JSON structure.

  4. 4

    INI limitations: no nested sections (only one level), no arrays, no type information (everything is a string). If your config needs these features, migrate to TOML or YAML instead of INI. The conversion to JSON is a one-way migration — use JSON or TOML going forward.

Frequently asked questions

Can INI have nested sections?
Standard INI does not support nesting. Some implementations (Python configparser) allow [section.subsection] which creates a flat key, not a nested object. If you need nesting, use TOML, YAML, or JSON instead.
How are duplicate keys handled?
It depends on the parser. Some take the last value, some raise an error, some create an array. This ambiguity is a weakness of INI — JSON does not have this problem because duplicate keys are undefined behavior (most parsers take the last value).

Workflows that solve this

Compare two YAML configs via JSON
Convert YAML configs to JSON for diff-friendly comparison of structured values.
PIPELINE
Encode a JSON payload for URL transport
Prepare a JSON document for a URL parameter: pretty-print, Base64-encode, then percent-encode — the exact inverse of the nested-parameter decode chain.
PIPELINE
HJSON to JSON Format
Format HJSON then convert to standard JSON.
PIPELINE
Format JSON and compute integrity checksum
Pretty-print a JSON document and compute a CRC32 checksum to detect any subsequent modifications.
PIPELINE
Minify and validate JSON
Format JSON for inspection and validate it is syntactically correct in one pass.
PIPELINE
Format JSON and generate TypeScript interface
Format a JSON document then infer a TypeScript interface definition in one chain.
PIPELINE
Validate, format, then convert JSON to YAML
Convert a (possibly minified) JSON config to YAML, catching syntax errors at the first node instead of producing subtly wrong YAML.
PIPELINE
JSON5 to JSON Format
Format JSON5 then convert to standard JSON.
PIPELINE
JSONC to JSON Format
Format JSONC (JSON with comments) then convert to standard JSON.
PIPELINE
Decode and format a JWT payload
Parse a JWT token, extract its payload, and format the JSON for inspection.
PIPELINE
Parse Query String and Format JSON
Parse query string into key-value pairs then format as JSON.
PIPELINE
Convert TOML to JSON
Parse a TOML configuration file into JSON for tools and APIs that expect JSON input.
PIPELINE
TOML to JSON to CSV
Convert TOML to JSON then to CSV for data export.
PIPELINE
Convert TOML to JSON then YAML
Transform a TOML config into YAML via JSON for Kubernetes or CI tooling.
PIPELINE
Convert TOML to YAML via JSON
Transform a TOML configuration file into YAML format, using JSON as an intermediate representation.
PIPELINE
Decode nested URL parameter (Base64 JSON)
Unwrap a URL parameter that carries URL-encoded Base64 JSON into readable, formatted JSON.
PIPELINE
Generate TypeScript interfaces from YAML
Convert a YAML document to TypeScript interface definitions, using JSON as an intermediate format.
PIPELINE

Learn more

Want to understand why?

Related tools