INI Parser
Parse and convert INI configuration files to JSON instantly. Supports sections, comments, and quoted values. All processing done in your browser.
Parsed JSON will appear here...
How to Use INI Parser
Paste INI
Enter or paste your INI configuration content into the input area.
Parse
Click the Parse button to convert your INI to JSON.
Copy JSON
Review the generated JSON output and copy it to your clipboard.
What is an INI File?
INI files are a simple text-based configuration file format commonly used on Windows and in many applications. They use a straightforward structure of sections, keys, and values that is easy for both humans and machines to read.
INI Structure
Sections
Denoted by [section_name] headers to group related settings
Key-Value Pairs
Simple key = value assignments within sections or globally
Comments
Lines starting with ; or # are treated as comments
Frequently Asked Questions
This parser supports sections, key=value pairs, comments (using ; or #), quoted string values, and multiline values. It also handles boolean and numeric type detection.
This parser handles standard INI format. Some PHP-specific extensions like constant substitution and special operators may not be supported.
When duplicate keys are found in the same section, the last value takes precedence. This follows standard INI parsing behavior.
Classic homes: php.ini (the PHP engine's entire configuration), .gitconfig, the win.ini heritage on Windows, .desktop entries on Linux, and many games and desktop apps. The format's roots go back to the 1960s-70s, which is why syntax varies slightly everywhere - sections, key=value, and semicolon comments are the stable core.
No - everything is a string; types are a consumer-side convention. PHP's parse_ini_file() casts true/on/yes/1 and false/off/no/0 to booleans (documented behavior), converts number-looking values to integers and floats, and keeps the rest as strings. Quoting a value ('1') preserves it as a string in PHP. This parser shows the raw values as written.
[section] starts a section that scopes all following keys until the next header - php.ini's [PHP] and [mail function] blocks work this way. Nesting is faked with dotted keys (database.host = localhost) or section names like [database.pool], since the format itself has only one level. Deeply nested data is a sign you have outgrown INI and want TOML or YAML.
The baseline format defines almost no escapes - values are taken literally up to end-of-line. In practice: double quotes group values containing spaces and are the only portable way to keep leading or trailing whitespace; ${VAR} interpolation exists in some implementations (systemd, for one) but not others; and whether ; and # start comments mid-line depends on the consuming parser.
.env is INI's flat subset: KEY=value lines, no sections, consumed by dotenv libraries in a dozen languages following the 12-Factor App configuration methodology. INI files lean on sections and are read by specific applications rather than a generic convention. Values in .env are almost always strings injected into environment variables, while INI consumers often apply their own typing rules.
Related Tools
Authoritative References
Primary sources behind this tool - official standards and specifications, not secondhand summaries.