INI to JSON Converter
Convert INI configuration text into a JSON object. Parses [section] headers (including dotted, nested sections), key = value pairs, quoted values and comments. Optional type coercion turns true/false and numeric strings into real JSON booleans and numbers. Runs entirely in your browser.
Input
Options
Output
Guides
Paste INI configuration text and get a clean, pretty-printed JSON object back. This converter reads the classic [section] / key = value INI format and turns it into structured JSON you can drop into a JavaScript app, a REST payload, or any tool that speaks JSON instead of INI. Everything runs in your browser — your configuration never leaves your machine.
What INI-to-JSON conversion is for
INI files are a lightweight, human-friendly way to store settings — think php.ini, .gitconfig, desktop app configs, and countless server config files. They are easy to hand-edit but awkward to load programmatically in modern stacks, most of which expect JSON. Converting INI to JSON lets you:
- Migrate legacy configuration into JSON-based tooling.
- Feed settings into JavaScript, TypeScript, or JSON-driven APIs.
- Inspect a config's structure with proper nesting and data types.
- Diff or validate configuration with JSON-aware tools.
How to use the tool
- Paste your INI text into the INI Input box (or click Try an example).
- Adjust the options if needed — the defaults suit most files.
- Copy or download the resulting JSON from the JSON Output panel.
The output updates automatically as you type.
Options
- Type coercion (on by default): converts values to their natural JSON types.
true/on/yesbecometrue,false/off/nobecomefalse,null/noneand empty values becomenull, and numeric strings like3306become numbers. Turn it off to keep every value as a string. - Strip inline comments (on by default): removes a trailing
; commentor# commentfrom a value. Comments inside quoted values are preserved. - Duplicate keys: choose Last wins (later value replaces earlier) or Collect as array (repeated keys become a JSON array).
- Indent: 2 spaces, 4 spaces, tab, or minified (single-line) output.
FAQ
How are sections turned into JSON?
Each [section] becomes a nested object. A dotted header like [database.options] nests further — { "database": { "options": { ... } } }. Keys defined before any section land at the root of the object.
Are booleans and numbers really converted?
Only when Type coercion is enabled (the default). With it on, ssl = true becomes a JSON boolean and port = 3306 becomes a JSON number. Disable the option if you want strict string values.
What about values that contain an equals sign or a semicolon?
Only the first = on a line splits key from value, so callback = https://x?a=1&b=2 keeps the full URL. Inline-comment stripping is skipped for quoted values, so note = "value; with semicolon" keeps its semicolon intact.
Is my data uploaded anywhere?
No. The conversion happens entirely in your browser using a self-contained parser, so your configuration — including any secrets it may hold — is never sent to a server.
What's the difference from an INI formatter?
An INI formatter tidies INI and returns INI. This tool changes the format entirely: INI in, JSON out.