INI JSON Converter
BetaConvert INI, .cfg and .conf files to nested JSON and back in your browser. Each [section] becomes an object, comments are dropped, and values stay strings by default.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
The config is converted in your browser and is not uploaded to FindUtils. Analytics and ads may load on the page.
The JSON will appear here..
How to convert an INI file to JSON
-
Paste or upload the file
Paste the INI text into the left panel or upload a .ini, .cfg or .conf file. The samples are a php.ini excerpt, a git config and a Windows-style app.cfg. -
Read the sections
Every [section] becomes a nested object and any keys above the first header sit on the root. Comments opened by ; or # are dropped, and a quoted value keeps the spaces and punctuation inside the quotes. -
Decide on types
Values stay strings by default, which is what most INI readers return. Turn on Numbers and booleans to promote 8080 and true when a schema expects them. Values with leading zeros stay strings. -
Copy or download
Copy the JSON or download converted.json. Switch the direction to write [section] blocks back from a JSON object; the current output moves into the input for a round-trip check.
Common Use Cases
Feeding a JSON-only tool
Reviewing a legacy config
Generating an INI from JSON
Finding duplicate keys
Why convert INI to JSON in the browser?
There is no INI standard. Every program that reads one invented its own rules, which is why a converter has to say exactly which rules it follows. FindUtils' INI JSON Converter implements the common ground that php.ini, git-style configs, Windows .cfg files and Python configparser actually agree on: [section] headers, key = value and key: value, comments opened by ; or # at the start of a line or after whitespace, and quoted values that keep whatever sits inside the quotes.
Each section becomes a nested object and keys above the first header stay on the root, so the JSON mirrors the file's shape rather than a guess at it. Values stay strings because that is what an INI reader hands back, with an option to promote clean numbers and booleans. A duplicate key keeps the last value, the way most readers do, and every duplicate is reported with the lines it appeared on instead of disappearing.
The reverse direction writes one level of sections and refuses deeper nesting or arrays with a plain message, because there is no array syntax every INI parser accepts and inventing one would produce a file that silently fails elsewhere. For dotenv files use the Env JSON Converter, for Java .properties the Properties JSON Converter, and for TOML the JSON TOML Converter.
How it compares
Most online INI converters split each line at the first equals sign. That is enough for a simple file and wrong for a real one: an inline comment ends up inside the value, a quoted string loses its spaces, and a duplicate key vanishes without a word. This page reports what it changed and refuses what it cannot express instead of guessing.
Compared with a Python one-liner using configparser, the page needs no interpreter and shows the nested shape immediately. It is not a substitute for a program's own reader: interpolation such as %(name)s, multi-line continuations and vendor-specific escapes are left as written.
INI Conversion Tips
- A ; or a # only opens a comment when it starts the line or follows whitespace. A # in the middle of a word is part of the value.
- Quote a value to keep a semicolon, a hash or leading and trailing spaces. Everything after the closing quote is treated as a comment.
- Section names are kept exactly as written. A header such as [a.b] becomes one key named "a.b" rather than a two-level tree, so a round trip returns the same file.
- Leave Numbers and booleans off when the values are read back as text. On is a string in every INI dialect, and turning 007 into 7 would change an id.
- Going back to INI accepts one level of sections. A value nested two levels deep, or an array, is refused with a message rather than written in a syntax only some parsers accept.