INI Converter
Convert INI or CFG text in your browser into JSON, YAML, properties, environment-variable text, and normalized INI with parser checks.INI Converter
| Field | Value | Copy |
|---|---|---|
| {{ row.label }} | {{ row.value }} |
| Line | Section | Key | Status | Preview | Copy |
|---|---|---|---|---|---|
| {{ row.line }} | {{ row.section }} | {{ row.key }} | {{ row.status }} | {{ row.preview }} |
{{ normalizedYaml }}
{{ iniText }}
{{ envText }}
{{ propertiesText }}
| Document | Path | Type | Preview | Copy |
|---|---|---|---|---|
| Doc {{ row.docIndex }} | {{ row.path || '(root)' }} | {{ formatTypeLabel(row.type) }} | {{ row.preview }} |
| Path | Types | Docs | Example | Copy |
|---|---|---|---|---|
| {{ row.path }} | {{ row.types }} | {{ row.docs }} | {{ row.example }} |
Introduction:
Configuration handoffs often begin with a small INI or CFG file and end in a different runtime, build system, deployment script, or documentation set. The text looks plain because each setting usually sits on one line, but portability depends on more than the visible key=value pairs. A receiving system may disagree about comments, duplicate keys, section names, interpolation, case handling, empty values, or whether a value should stay text.
INI is better understood as a family of related conventions than as one fixed standard. Many files use square-bracket sections, whole-line comments, and delimiter-separated assignments, while individual parsers add their own rules for default sections, multiline values, option names, and data types. That flexibility is useful for hand-edited settings, but it makes conversion risky when the destination format is stricter or more explicit.
The most common mistake is treating a clean conversion as proof that the original configuration meant the same thing everywhere. A port number may become a number in JSON, a feature flag may become a boolean, a repeated key may silently lose one value, and a note after a semicolon may remain part of the setting instead of becoming a comment. The safer question is not just whether output was produced, but which parse decisions created it.
| Concern | Why it matters during conversion |
|---|---|
| Parser grammar | One parser may allow colon delimiters, interpolation, or multiline values while another reads only simple assignments. |
| Duplicate keys | First-wins and last-wins policies produce different configuration trees from the same text. |
| Scalar typing | Text that resembles a number or boolean can change meaning when it moves into a typed format. |
| Secrets | Connection strings, passwords, tokens, and internal hostnames are often copied along with ordinary settings. |
A good INI conversion workflow therefore has two jobs. It must render useful target text, and it must expose the assumptions made along the way so malformed lines, overwritten values, and type changes are caught before the result is pasted into another environment.
How to Use This Tool:
Start with the audit views, then copy or download the target format after the parse looks right.
- Paste text into
INI content, drop a.ini,.cfg, or.txtfile on the editor, chooseBrowse file, or loadSampleto inspect the expected shape. - Open
Advancedbefore comparing outputs. SetDuplicate keysto eitherLast declaration winsorFirst declaration wins, because that choice changes the retained value for repeated keys inside the same section. - Adjust output presentation only where the destination needs it.
JSON spacing,YAML indent,YAML line width, YAML quoting options,Path style,ENV prefix, andUppercase ENV keyschange generated text without repairing source mistakes. - Read the summary before using any tab. Unexpected key counts, duplicate-key notes, skipped-line notes, or a
Path preview trimmedbadge mean the conversion deserves review before export. - Use
Config Ledgerfor document counts, scalar counts, sample keys, and sample values, then useParser Traceto inspect how each line was classified as blank, comment, section, parsed, duplicate, or skipped. - Check
Path AtlasandSchema Shapebefore trusting flat exports. They show the paths, detected value types, document coverage, and examples behind the generated text. - Copy or download
YAML,JSON,Normalized INI,Runtime ENV, orJava Propertiesonly after the warning rows and path tables match the source file you intended to convert.
If a selected or dropped file cannot be read, the tool shows an error. If Apply to editor is used from the YAML tab, the editor now contains YAML text, so the next parse is no longer reading ordinary INI input.
Interpreting Results:
The converted output is a resolved reading of the source, not a byte-for-byte archive. Comments, original spacing, unsupported lines, and some parser-specific conventions are not preserved in the generated formats. Clean-looking JSON or YAML can still be wrong for your target if the trace shows a skipped line or a duplicate decision you did not expect.
Check warning text and audit tables before checking the final file extension. A duplicate warning tells you which value survived, while a skipped-line warning means a setting is missing from every generated output. Type rows matter too, because a string, number, and boolean can behave differently after the configuration moves into another parser.
| Signal | Meaning | Review action |
|---|---|---|
Duplicate key note |
A repeated key was resolved by the selected first-wins or last-wins policy. | Compare the winning value against the intended environment override. |
Skipped line note |
A line did not match a supported section header or key=value assignment. |
Fix the source line before exporting, because the setting is absent downstream. |
string, number, or boolean |
The value was typed according to narrow scalar rules. | Use Schema Shape to catch values that should remain text. |
Path preview trimmed |
The visible Path Atlas table reached the preview limit. |
Raise Max preview paths or use the full table export. |
| Flat env or properties text | Nested section paths were collapsed into plain keys. | Check punctuation, prefixing, and case rules against the destination loader. |
Normalized INI is useful for cleanup and comparison, but it is still a regenerated view. Use the original file when comments, ordering, exact capitalization, or parser-specific syntax must be preserved.
Technical Details:
INI conversion starts by choosing a grammar. The model used here is intentionally narrow: whole-line comments are ignored, square-bracket headers create sections, and only lines with an equals sign become assignments. That keeps the conversion auditable, but it also means features accepted by other INI parsers, such as colon delimiters, interpolation, key-only options, and multiline values, are outside the supported parse path.
After a line is accepted, the right-hand value is trimmed and typed conservatively. Double-quoted text decodes \n, \r, and \t; single-quoted text keeps its inner characters; bare true and false become booleans; simple base-10 integers and decimals become numbers. Values such as yes, 1e3, 08-prod, and prod ; note remain strings.
Transformation Core:
| Stage | Rule | Visible effect |
|---|---|---|
| Line classification | Blank lines, whole-line ; comments, whole-line # comments, section headers, assignments, duplicates, and skipped lines are recorded separately. |
Parser Trace explains why each line did or did not affect the result. |
| Section grouping | [section] opens or reopens a named object; assignments before any header belong to a default group. |
Section names become object paths unless the file contains only default-group keys. |
| Duplicate resolution | Repeated keys inside the same section keep either the first value or the last value. | Warnings and trace rows show whether a later assignment was ignored or replaced the earlier one. |
| Scalar typing | Only quoted text, true/false, and simple decimal numbers receive special typing. |
Schema Shape, JSON, and YAML expose the resulting string, number, and boolean choices. |
| Path flattening | Nested values become dot-style or slash-style paths with a value preview and type. | Path Atlas, env text, properties text, and normalized INI are built from those paths. |
Flat target formats need extra key handling. Environment-variable text collapses punctuation and separators into underscores, can prepend a user-supplied prefix, and can uppercase generated keys. Properties text keeps path-like keys with scalar values. Normalized INI regenerates section and key names as lowercase underscore tokens, so it is useful for clean handoff text but not for preserving original casing or comments.
| Input pattern | How it is read | Conversion consequence |
|---|---|---|
[database] |
Starts or reopens the database section. |
Later assignments appear under paths such as database.host. |
port=5432 |
Stores port as the number 5432. |
JSON and YAML emit a numeric value; flat text formats still render characters. |
enabled=false |
Stores a boolean false value. | A destination expecting the literal string false may need quotes in its own format. |
mode=prod ; note |
Keeps ; note inside the value. |
Inline comment-like text is not removed. |
host localhost |
Skipped because no equals sign separates key and value. | No converted output contains that setting. |
The path preview limit affects display, not the stored conversion result. The visible Path Atlas table can be capped between 50 and 2000 rows, while full table exports still use every discovered path.
Privacy Notes:
The conversion runs in the browser after the page has loaded, and selected files are read as local text for the current session. The tool does not need to upload the pasted INI content to produce JSON, YAML, env, properties, or normalized INI output.
- Treat pasted configuration as sensitive if it contains passwords, access tokens, internal domains, or database names.
- Copied text and downloaded files contain the same sensitive values as the source unless you remove them first.
- Use a controlled browser profile or local workstation when reviewing production configuration.
Worked Examples:
Service settings moved into deployment files:
[server]
host=localhost
port=8080
[database]
user=appuser
pool=5
Config Ledger reports four scalar values. Path Atlas includes server.host, server.port, database.user, and database.pool. Schema Shape shows server.port and database.pool as numbers, so JSON and YAML will not quote those two values by default.
Duplicate override review:
[app]
mode=prod ; old note
mode=stage
enabled=true
timeout=1e3
With Last declaration wins, Parser Trace marks the second mode line as replacing the previous value. enabled becomes a boolean, while timeout stays a string because scientific notation is outside the simple decimal rule.
Missing delimiter:
[server]
host localhost
port=8080
Parser Trace reports the host line as skipped because it has no equals sign. The generated Runtime ENV, Java Properties, JSON, and YAML outputs contain port but no host, so the source line should be corrected before export.
FAQ:
Does it support every INI dialect?
No. It uses a narrow parse model with section headers, key=value assignments, whole-line comments, duplicate-key policy, and conservative scalar typing. Dialect features such as interpolation, colon delimiters, key-only options, and multiline values should be checked before relying on the output.
Why did text after a semicolon stay in the value?
Only lines that begin with ; or # after trimming are treated as comments. A line such as mode=prod ; note is read as one assignment, so the semicolon text remains part of the value.
What happens when the same key appears twice?
Duplicate keys chooses the winner. First declaration wins keeps the earlier value, while Last declaration wins replaces it with the later value. The warning text and Parser Trace show the decision.
Why did a value become a number or boolean?
Bare true and false become booleans, and simple integers or decimals become numbers. Use quotes in the original INI text when a numeric-looking value must stay text.
Why are some generated keys renamed?
Flat formats need safe key names. Env output collapses punctuation and separators into underscores, and normalized INI output lowercases sanitized section and key tokens.
Is configuration data uploaded for conversion?
No upload is needed for the conversion itself. The text is parsed in the browser after the page loads, but pasted secrets still appear in copied and downloaded output.
What should I do when YAML output is missing?
If YAML formatting support is unavailable, the tool shows a warning instead of silently producing partial YAML. Reload the page and retry, or use the JSON and audit tabs to continue reviewing the parse.
Glossary:
- INI section
- A named group such as
[server]that contains related assignments. - Assignment
- A
key=valueline that can be parsed into a setting name and value. - Scalar
- A final value such as a string, number, boolean, or empty string.
- Duplicate key
- A repeated key inside the same section, resolved by the selected first-wins or last-wins policy.
- Flattened path
- A rendered address such as
server.portorserver/portthat points to one parsed value. - Schema Shape
- The grouped path table showing observed types, document coverage, and example values.
References:
- configparser, Python Software Foundation.
- YAML Ain't Markup Language version 1.2.2, YAML Language Development Team, 2021.
- RFC 8259: The JavaScript Object Notation Data Interchange Format, RFC Editor, 2017.
- Environment Variables, Node.js documentation.
- Class Properties, Oracle Java SE 21 API documentation.