INI ↔ JSON
Bidirectional converter between INI configuration files and JSON. Sections become nested objects.
Convert INI configuration files to JSON online: free and instant
INI files are one of the oldest and most widely-used configuration formats. They are human-readable and supported by countless applications: from PHP and Python to Windows Registry exports. But modern web applications and APIs almost universally prefer JSON. This tool bridges that gap by converting any valid INI file to well-structured JSON without any server upload.
The converter maps each INI section to a nested JSON object and places top-level key-value pairs at the root. Comment lines are omitted from the output since JSON does not support comments. The result is valid, pretty-printed JSON you can use directly in your project.
Step-by-step guide
- 1Paste your INI content
Enter or paste your INI file contents: sections, key-value pairs, and comment lines: into the input panel. - 2Preview the JSON output
The tool converts the INI structure to a JSON object instantly. Each INI section becomes a JSON object key. - 3Review section nesting
Keys without a section appear at the root level. Keys inside a [section] are nested under that section's key in the JSON. - 4Copy the JSON
Click Copy to put the formatted JSON on your clipboard, ready to paste into your project. - 5Use in your application
Drop the JSON into your config system, database seed script, or any tool that expects JSON input.
Related Tools
CSV → JSON
Convert comma-separated data to JSON arrays with automatic header detection.
JSON → CSV
Convert JSON arrays of objects to CSV with automatic column extraction.
JSON → XML
Serialize JSON objects to well-formed XML with configurable root element.
XML → JSON
Parse XML documents to JSON with attribute and text node preservation.
Frequently Asked Questions
- What is an INI file?
- An INI file is a plain-text configuration format commonly used by Windows software and many cross-platform tools. It is organised into named sections (e.g. [database]) containing key=value pairs, and supports # or ; comment lines.
- How are INI sections represented in the JSON output?
- Each [section] header becomes a key in the root JSON object, and its key-value pairs become nested properties. Keys that appear before any section header are placed at the root level.
- Are comments preserved in the JSON?
- No. INI comments (lines starting with # or ;) are stripped because JSON does not have a comment syntax.
- What happens if a key appears in multiple sections with the same name?
- Because each section maps to a distinct JSON object, duplicate key names in different sections are kept separate. A duplicate key within the same section will be overwritten by the last value.
- Does this tool handle multi-line values?
- Standard INI format does not define multi-line values. This converter treats each line as a separate key-value pair, so multi-line extensions specific to certain parsers may not be handled correctly.
- Is the JSON output pretty-printed?
- Yes. The output is formatted with indentation for readability. You can minify it with the JSON Minifier tool if needed.
- Is my INI data sent to a server?
- No. All conversion happens in your browser. Your configuration data is never transmitted or stored anywhere.
- Is this tool free?
- Yes, completely free with no account, no sign-up, and no usage limits.
AlteredIdea vs alternatives
vs server-side converters: AlteredIdea converts in your browser: your data never leaves your device.
vs writing scripts: Instant results, no coding needed.
vs paid tools: Completely free, no account required.