What this tool does
Nesting becomes dots, lists become indices:
db:
host: db.example.com
port: 5432
hosts:
- a
- b
db.host=db.example.com
db.port=5432
hosts[0]=a
hosts[1]=b
The [i] form is the Spring convention, and the one most readers expect.
The escaping is the whole job
A .properties file is deceptively simple, and three of its rules quietly eat data.
A value that starts with a space. Properties.load skips the whitespace after the separator, so key= x reads back as x. The first space is escaped — key=\ x — and the value survives. Trailing spaces are kept as they are.
A key that starts with # or !. That line is a comment. The whole entry, key and value, vanishes on reading. Those two characters are escaped when they lead a key.
=, : and spaces inside a key are escaped too, and so is every backslash. A newline in a value becomes \n, a tab \t.
Two keys that flatten to the same name
"a.b": 1
a:
b: 2
Both give a.b. The format cannot distinguish them, and Properties.load keeps the last — so one of your two values would be gone, with nothing to say so.
The conversion stops and names the key. It is the only case here where the tool refuses rather than converts, and it is the case where converting would lie.
There are no types
Everything in a .properties file is text. true comes back as "true", 42 as "42", and a null as an empty value. Your reader decides what any of it means — Boolean.parseBoolean, Integer.parseInt, and a decision about what empty means.
A word on encoding
The output is UTF-8 text, accented characters and all. That is what modern Java reads, and what Properties.load(Reader) has always read.
But Properties.load(InputStream) — the older, more common call — reads ISO-8859-1, and will turn café into mojibake. If your reader is that one, either switch it to the Reader overload or escape the non-ASCII characters as \uXXXX before shipping the file.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.