INI to Properties Converter
Convert INI configuration files to Java .properties format with dot-notation key flattening.
How INI to Properties conversion works
Java .properties files use a flat key=value format without sections. This converter flattens INI sections by prepending the section name with a dot:[database] +host = localhost becomesdatabase.host = localhost. Comments are preserved as # style lines.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Moving configuration from an INI-based tool to a Java application that reads properties.
- Flattening sections into dot-notation keys the target framework expects.
- Producing a properties file from an existing INI without retyping it.
- Comparing an INI and a properties file by converting one to the other's format.
- Migrating a legacy configuration during a platform change.
Frequently Asked Questions
- How do INI sections survive the conversion?
- They become a key prefix: `[database]` with `host=localhost` inside becomes `database.host = localhost`. `.properties` has no section concept, so the dotted prefix is the conventional way to keep the grouping — and it is what Spring and most Java tooling expect.
- Why are backslashes doubled?
- Because a backslash starts an escape sequence in `.properties` — a Windows path written `C:\temp` would otherwise be read as `C:` followed by a tab. Doubling it is what makes the value survive `java.util.Properties`.
- Is INI a real specification?
- No — there has never been one. Comment markers (`;` versus `#`), quoted values, duplicate keys, nested sections and case sensitivity all vary by parser, which is why converting an INI file is always partly a guess about which dialect wrote it.
- What happens to comments?
- They are kept and normalised to `#`, which `.properties` understands, and each section header is also left behind as a comment so the original grouping stays readable. INI's `;` marker is not valid in a properties file.
- Do non-ASCII values survive?
- Modern tooling reads `.properties` as UTF-8 and they are passed through unchanged. Java 8 and earlier read the file as ISO-8859-1 and required `\uNNNN` escapes — if you are targeting an old runtime, run the output through a Unicode escape tool.
- Which character encoding does a .properties file use?
- Historically ISO-8859-1 with `\uXXXX` escapes for anything else, though modern Java reads UTF-8 for XML-format properties and newer releases relaxed it. Writing raw UTF-8 into a legacy file is why accented values arrive corrupted.
Common errors and gotchas
- Losing section boundaries, so two identically named keys in different sections collide.
- Assuming comment syntax carries over, since the two formats do not use the same characters.
- Overlooking that properties files require escaping for colons and equals signs inside keys.
- Expecting types to appear. Both formats store strings and neither records intent.
- Ignoring encoding, where older properties files are read as Latin-1 rather than UTF-8.
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to XML
Convert JSON structures into nested XML markup.
HWB to HEX Converter
Convert an HWB color to HEX.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.
CSV to XML
Convert CSV rows into structured XML records.
XML to CSV
Flatten repeated XML records into CSV rows.
INI to JSON
Parse INI config sections and keys into JSON.