CFG / INI to JSON / TXT
Parse game .cfg / .ini configuration sections into clean JSON or TXT — 100% private client-side processing.
Active Converter
CFG / INI to JSON / TXT: Parsing Game Settings, php.ini & Legacy Config Files
Technical Anatomy of .INI and .CFG Configuration Files
Dating back to MS-DOS and Windows 3.1, the INI (Initialization) and CFG family remains ubiquitous across desktop software, Linux daemons, and PC game engines. An INI file organizes parameters under bracketed headers ([Graphics], [mysqld]), followed by key = value assignments and semicolon (;) or hash (#) comment lines.
Because INI has no formal RFC standard—handling whitespace, quotes, and nested hierarchies inconsistently across parsers—modern web dashboards and automation scripts prefer JSON. Converting .ini or .cfg into nested JSON transforms every [Section] into a clean object node ready for validation, diffing, or API submission.
Raw Unreal / Game .INI Input vs. Structured JSON Output
; Input: PC Game Config (GameUserSettings.ini)
[ScalabilityGroups]
sg.ResolutionQuality=100
sg.ShadowQuality=2
sg.AntiAliasingQuality=3
# Converted .JSON Output:
{
"ScalabilityGroups": {
"sg.ResolutionQuality": "100",
"sg.ShadowQuality": "2",
"sg.AntiAliasingQuality": "3"
}
}
Real-World Software & Hardware Ecosystem
PC gamers, sysadmins, and embedded developers parse .ini and .cfg files from Unreal Engine (Engine.ini), Bethesda Skyrim/Fallout (SkyrimPrefs.ini), Counter-Strike 2 / Source Engine, PHP (php.ini), MySQL (my.cnf), Git (.gitconfig), and systemd service units.
Troubleshooting & Edge Cases
- Inline Comments After Values: Some INI dialects allow
timeout = 30 ; secondswhile others treat;inside a URL or password as literal text. Verify trimmed values in the live JSON editor before saving. - Windows UTF-16LE Registry/INI Exports: Certain legacy Windows installers save
.inifiles in UTF-16; re-save as UTF-8 if extra spaces appear between letters. - Flattened TXT Export: Choose
Export .TXTto strip comments and blank lines when pasting clean key-value summaries into support tickets.
INI / CFG Dialect Comparison Across Games & Servers
| Platform | Comment Char | Example File |
|---|---|---|
| Unreal Engine / Windows | ; (semicolon) | Engine.ini, GameUserSettings.ini |
| Linux / PHP / MySQL | ; or # | php.ini, my.cnf, .gitconfig |
| Source / Counter-Strike 2 | // | autoexec.cfg, config.cfg |
Diffing Staging vs. Production Configs After JSON Export
# Compare two converted php.ini JSON snapshots with jq & diff:
diff -u <(jq -S . prod_php.json) <(jq -S . stage_php.json)
Frequently Asked Questions
Each bracketed [SectionName] becomes a top-level JSON object key, and every key=value assignment underneath it is nested as a child property—while comments starting with ; or # are cleanly stripped.
Yes. Space-separated or key=value lines outside any [Section] header are placed into a clean root object so you can diff CS2, Skyrim, or Unreal Engine Engine.ini settings programmatically.
Standard INI maps one value per key per section; if a game config repeats identical keys, inspect the live JSON preview on the right to verify whether array grouping or last-write-wins fits your parser.
Yes. Converting php.ini, my.cnf, or Windows desktop.ini into JSON lets DevOps teams compare staging vs. production configuration using jq or standard JSON diff tools.