Convert to INI

Convert CSV, JSON, NDJSON, TOML, TSV, XML, or YAML configuration data to INI. Paste the source or open a local file. The conversion runs in your browser and does not upload the input.

How conversion works

Link

NDJSON input becomes a set of INI sections. Each line must contain an object. Its section property supplies the section name and is not written as a key. Missing section names become section1, section2, and so on. Duplicate names produce an error.

JSON, XML, and YAML input should describe a shallow configuration object. Top-level scalar values become global keys. An object named global is also written without a section heading. Other top-level objects become sections, and values inside them must be scalar.

CSV and TSV use the first row as key names. A column named section supplies the section name for each row and is not written as a key. If that value is missing or empty, the converter creates names such as section1 and section2. Section names must be unique. CSV input also lets you choose the delimiter.

Numbers and booleans become text, null becomes an empty value, and line breaks become spaces. Invalid input produces an error instead of partial INI.

What INI can represent

Link

INI is a plain-text configuration format made from key-value pairs and named sections. A key and value are separated by an equals sign. A section name appears in square brackets and applies to the keys below it.

name=demo

[server]
host=localhost
port=8080
enabled=true

The name key is global. The remaining keys belong to server. INI stores every value as text. The program reading the file decides whether true is a boolean or 8080 is a number.

INI has no universal specification. Parsers differ in their handling of comments, quotes, duplicate keys, escaping, and letter case. Check the target program’s documentation before replacing an existing configuration file.

Syntax varies between applications

Link

Many parsers accept comments beginning with ; or #, but some recognise only one of them. Applications also disagree about whether quotes belong to the value, whether whitespace around = is significant, and whether keys are case-sensitive. Duplicate keys may replace an earlier value, form a list, or cause an error. Even the meaning of a key outside a section depends on the parser.

This variation is why INI is better understood as a family of related formats than as one strict standard. When an application already provides a sample configuration, use its spelling and layout as the authority. The converter produces a conservative key-value form, but it cannot know private conventions such as environment substitution or dotted key names.

Where INI works well

Link

INI suits small configuration files with scalar settings divided into a few named groups. Host names, ports, paths, feature switches, and similar values remain easy to scan and edit. Lists, repeated records, and deeply nested settings quickly become awkward because the basic format has no shared notation for them.

What may be lost

Link

INI works for scalar settings arranged in shallow groups. It cannot faithfully store arrays, repeated XML elements, or objects nested below a section. The converter rejects those structures instead of inventing flattened key names. XML attributes and mixed content may also produce structures that INI cannot represent.

The output contains no source comments or formatting. Review values containing ;, #, =, leading spaces, or trailing spaces because applications disagree about quoting and escaping them.

Files, privacy, and saved work

Link

Select a file or drop it on the file control. A recognised extension selects the matching input type. The browser reads the file locally with FileReader and does not upload it.

The selected format, each format’s input, and the CSV delimiter are stored in localStorage. Switching formats does not overwrite work saved for another format. Clear the fields or site data after handling secrets on a shared device.

Link

Widget made with staark