INI Converter
Convert INI or CFG text into JSON, YAML, env text, Java properties, and normalized INI with duplicate-key, skipped-line, and type checks.Conversion result
Conversion result
| 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 files are often treated as plain text until they have to move between runtimes. A short INI file may begin life as a hand-edited service setting, then end up in a deployment manifest, Java properties file, shell environment, JSON payload, or YAML document. The visible lines look simple, but the meaning depends on how the receiving parser reads sections, comments, duplicated keys, empty values, and values that resemble numbers or booleans.
INI is not one universal standard. The familiar pattern is a section header such as [database] followed by assignments such as host=localhost, with comments often starting with ; or #. Different parsers add their own decisions around colon delimiters, inline comments, interpolation, repeated sections, case folding, multiline values, and keys without values. A conversion that works for one parser can be incomplete or misleading for another.
| Issue | Why it changes the converted result |
|---|---|
| Duplicate keys | First-wins and last-wins policies keep different values when a section repeats the same setting. |
| Inline comment text | A semicolon after a value may be data, not a comment, unless the parser explicitly supports inline comments. |
| Typed formats | JSON and YAML can represent booleans and numbers directly, while many INI and env consumers read text first. |
| Flat destinations | Environment variables and properties text collapse sections into path-like keys, so punctuation and casing can matter. |
A useful INI conversion has to preserve the setting tree clearly enough for the next format while also showing the parse choices that created it. That means the audit trail matters as much as the final JSON, YAML, env, properties, or regenerated INI text. Skipped lines, overwritten keys, and unexpected scalar types are the places where a clean-looking output usually fails.
The safest habit is to treat the converted text as a translated reading, not as a perfect archive. Keep the original file when comments, exact spacing, parser-specific syntax, or historical ordering must survive.
How to Use This Tool:
Start by checking the parse, then use the target-format tabs after the warnings and paths look right.
- Paste source text into
INI content, chooseBrowse filefor a.ini,.cfg, or.txtfile, or loadSamplewhen you want a reference input. - Open
Advancedand setDuplicate keysbefore reviewing the output.Last declaration winsreplaces an earlier value, whileFirst declaration winskeeps it. - Adjust output formatting only for the destination that needs it.
JSON spacing,YAML indent,YAML line width, YAML quoting,Path style,ENV prefix, andUppercase ENV keyschange generated text, not the source parse. - Read the summary and
Parser Tracebefore copying any target format. Duplicate-key warnings, skipped-line warnings, or an unavailable YAML formatter mean the result needs attention. - Use
Config Ledger,Path Atlas, andSchema Shapeto confirm section counts, scalar values, flattened paths, detected types, and examples. - Copy or download
YAML,JSON,Normalized INI,Runtime ENV, orJava Propertiesonly after the audit rows match the settings you meant to move. - Use the warning rows as the recovery path. Fix skipped assignments in
INI content, changeDuplicate keysif the retained value is wrong, or quote numeric-looking values in the source when they must remain text.
Interpreting Results:
The final text is trustworthy only when the trace agrees with the source. Clean JSON or YAML does not prove every original setting was included. A skipped line is absent from every generated format, and a duplicate warning means one value has been chosen over another.
Type detection is the other place to slow down. Bare true and false become booleans, and simple base-10 integers or decimals become numbers. A port such as 5432 may be correct as a number, while an identifier such as 0012 or 08-prod should usually remain text.
| Signal | What it means | What to check next |
|---|---|---|
Duplicate key |
The selected duplicate policy kept one value and ignored or replaced another. | Compare the retained value with the intended override order. |
Skipped line |
The line did not match a section header or key=value assignment. |
Repair the source line before exporting. |
Path preview trimmed |
The visible path table reached the preview limit. | Raise Max preview paths or use the full export when auditing a large file. |
Runtime ENV |
Nested paths are flattened into environment-style names. | Check underscores, prefixes, uppercase conversion, and destination naming rules. |
Normalized INI |
Sections and keys are regenerated as sanitized lowercase tokens. | Use it for cleanup, not for preserving comments, spacing, or original casing. |
A successful conversion is still not a deployment approval. Paste a small result into the destination parser or runtime before moving production configuration, especially when secrets, booleans, ports, or repeated keys are involved.
Technical Details:
The parser uses a deliberately narrow INI grammar so the result can be audited line by line. Blank lines are recorded, whole-line comments beginning with ; or # are ignored, square-bracket headers open sections, and assignments require an equals sign. Colon delimiters, interpolation, key-only options, multiline values, and parser-specific include behavior are outside this parse model.
Accepted values are trimmed before scalar typing. Double-quoted text decodes \n, \r, and \t; single-quoted text keeps its inner characters; bare true and false become booleans; simple integers and decimals become numbers. Scientific notation, yes/no words, inline semicolon notes, and mixed identifiers remain strings.
Transformation Core:
| Stage | Rule | Visible output |
|---|---|---|
| Line classification | Each line is labeled as blank, comment, section, parsed assignment, duplicate, or skipped. | Parser Trace shows why each line did or did not affect the result. |
| Section grouping | [name] opens or reopens a section; assignments before a section belong to a default group. |
Section names become object paths unless only default keys exist. |
| Duplicate resolution | A repeated key in the same section is resolved by the selected first-wins or last-wins policy. | Warnings and trace rows show whether the earlier value survived. |
| Scalar typing | Only quoted text, booleans, and simple decimal numbers receive special treatment. | Schema Shape, JSON, and YAML expose the resulting types. |
| Flattening | Nested values become dot-style or slash-style paths for path review and flat formats. | Path Atlas, env text, properties text, and normalized INI use those paths. |
Flat output needs extra naming rules because environment variables and Java properties do not carry nested objects. Runtime env output turns punctuation and separators into underscores, optionally prepends ENV prefix, and can uppercase keys. Properties output keeps path-like scalar keys. Normalized INI groups paths back into sections and lowercases sanitized tokens.
| Input pattern | How it is read | Conversion consequence |
|---|---|---|
[server] |
Starts or reopens the server section. |
Later keys appear under paths such as server.host. |
port=5432 |
Stores port as a number. |
JSON and YAML emit a numeric value unless the source is quoted. |
enabled=false |
Stores a boolean false value. | A destination expecting the literal string false may need quoted source text. |
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. | Every target format misses that setting until the source is fixed. |
Max preview paths controls the visible path table only. Values below 1 fall back to the default, the displayed range is clamped from 50 to 2000 paths, and full table exports still include every discovered path.
Privacy Notes:
The conversion runs in the browser after the page has loaded. Pasted text and selected files are read locally for the current session, and no upload is required to produce the generated JSON, YAML, env, properties, or normalized INI text.
- Treat configuration text as sensitive when it contains passwords, tokens, internal hostnames, DSNs, or deployment names.
- Copied and downloaded outputs contain the same sensitive values unless you remove them before conversion.
- Use a controlled browser profile or 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 marks server.port and database.pool as numbers, so quote those source values first if the destination needs text.
Duplicate override review
[app]
mode=prod ; old note
mode=stage
enabled=true
timeout=1e3
With Last declaration wins, the second mode replaces the first. enabled becomes a boolean, while timeout stays a string because scientific notation is outside the simple decimal rule. The semicolon note in the first mode value would have stayed part of the value if that line had won.
Missing delimiter
[server]
host localhost
port=8080
Parser Trace reports the host line as skipped because it has no equals sign. The generated env, properties, JSON, YAML, and normalized INI output includes port but not host, so the source line should be changed to host=localhost before export.
FAQ:
Does it support every INI dialect?
No. It supports section headers, key=value assignments, whole-line comments, duplicate-key policy, and conservative scalar typing. Interpolation, colon delimiters, key-only options, multiline values, and parser-specific include behavior should be checked in the destination parser.
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, and Last declaration wins replaces it with the later value. Warnings and Parser Trace show the decision.
Why did a value become a number or boolean?
Bare true and false become booleans, and simple base-10 integers or decimals become numbers. Quote the original INI value when a numeric-looking setting must stay text.
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 JSON plus the 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.