BYTETOOLS

INI to JSON Converter

Convert INI config files to JSON online. Sections become nested objects, dotted section names expand, values coerce to numbers and booleans — in-browser.

Drop an .ini / .cfg file here or click to browse

What is the INI to JSON Converter?

The ByteTools INI to JSON Converter parses classic INI configuration files — the format used by PHP's php.

  • [Sections] mapped to JSON objects
  • Dotted section names optionally nested
  • Duplicate keys collected into arrays
  • Optional number / boolean / null detection
  • Handles ; and # comments and quoted values
  • 100% private, in-browser parsing

How to use the INI to JSON Converter

  1. 1

    Paste your INI content or drop an .ini / .cfg file.

  2. 2

    Choose whether to detect numbers, booleans and null.

  3. 3

    Choose whether dotted [section.names] become nested objects.

  4. 4

    Click Convert to JSON.

  5. 5

    Copy the JSON or download it as a file.

About the INI to JSON Converter

The ByteTools INI to JSON Converter parses classic INI configuration files — the format used by PHP's php.ini, Git config, Windows settings files and countless applications — and produces clean, nested JSON. [Section] headers become objects, key = value pairs become properties, and ; or # comment lines are skipped.

Dotted section names like [server.tls] can optionally expand into nested objects, duplicate keys collect into arrays instead of overwriting each other, and unquoted values are recognised as numbers, booleans or null when type detection is on. Quoted values always stay strings.

Everything runs 100% locally in your browser — configuration files, which often contain hostnames, paths and credentials, are never uploaded anywhere.

Frequently asked questions

How are INI sections represented in JSON?

Each [section] becomes a JSON object under a key with the section's name, and the key = value lines inside it become that object's properties. Keys that appear before any section header sit at the top level of the JSON.

What does the dotted-section option do?

With it enabled, a header like [server.tls] is expanded into nested objects — server containing tls — which mirrors how many apps interpret dots. Disabled, the literal string "server.tls" is used as a single top-level key.

Will the value 8080 become a number or a string?

With type detection on, unquoted values that look like integers, decimals, true, false or null are converted to real JSON types, so port = 8080 becomes 8080. Turn detection off — or quote the value in the INI — to keep everything as strings.

What happens with duplicate keys in the same section?

They are gathered into a JSON array in the order they appear, which matches how formats like php.ini use repeated keys for lists. Nothing is silently overwritten.

Are comments preserved?

No — lines starting with ; or # are treated as comments and skipped, as JSON has no comment syntax to carry them into. Everything else, including blank-line structure, is irrelevant to the parsed result.

Related tools