INI Formatter & Validator
Last updated:
Paste INI (php.ini, configparser-style configs, and similar), normalize its formatting or convert it to JSON — dotted [section.path] headers nest like TOML's tables. All in your browser, nothing uploaded.
How it works
- Format re-serializes with normalized
key = valuespacing and quoting, while keeping your[section]headers, comments, and blank lines exactly where they were. - To JSON nests keys under their
[section], and a dotted section path like[servers.alpha]nests further — the same convention this site’s TOML formatter uses for dotted tables. - Handles top-level keys before any section header,
key: valueas an alternate tokey = value, double-quoted values with\n/\r/\"/\\escapes, single-quoted literal values, and full-line;or#comments. - To JSON only infers numbers and booleans from an unquoted value — a quoted
"true"or"123"always comes out as a JSON string, the same way quoting works as an explicit “force string” escape hatch in YAML and TOML. - Reopening the same
[section]merges into it rather than erroring — plain INI has no rule against splitting one section’s keys across two blocks, unlike this site’s TOML formatter, where redefining a[table]is a hard error because TOML’s own spec forbids it.
A duplicate key within the same section doesn’t block Format or To JSON — the last definition wins, and you’ll see a note above the output naming both lines. A key colliding with an existing section name (or vice versa) is a different, structural kind of problem and IS a hard error everywhere — that’s not a style risk, it’s two incompatible things trying to occupy the same name. There’s also no support for an inline/trailing comment after a value (key = value ; note) — classic INI has no comment-escaping convention for that position, so the ; and everything after it is just read as part of the value, not stripped.
Runs entirely in your browser — nothing you paste here is uploaded, logged, or stored.