What this tool does
A .properties file becomes YAML, with the dots turned into structure.
# service
app.name=Demo
app.port=8080
app.debug=true
app:
name: Demo
port: 8080
debug: true
= and : both separate a key from its value, comment lines start with # or !, and a line ending in a backslash continues on the next one. The escapes a .properties file uses — \:, \=, \n, \uXXXX — are decoded, so caf\u00e9 arrives as café.
Indexed keys become lists
app.hosts[0]=alpha
app.hosts[1]=beta
app:
hosts:
- alpha
- beta
That is how Spring writes a list into a file that has no lists, and it is what this site’s YAML-to-properties converter produces. Reading it, though, gave you two literal keys called hosts[0] and hosts[1]: the tool did not recognise its own output, and a round trip lost the sequence. Indexes now become a sequence when they run from 0 with no gap. A gap, a repeat, or a plain hosts next to them leaves the keys exactly as they were — moving a value to fill a hole would be inventing an order.
A repeated key is refused
app.port=8080
app.port=3000
Duplicate key "app.port": it already has a different value
Properties.load keeps the last assignment without a word, so the first value vanished. The YAML-to-properties direction already refused to write two keys that flatten to the same name; accepting them here in silence was the same hole seen from the other side. Two identical lines still pass, because repeating yourself is not the admission of anything.
What the values become
- Numbers and booleans are typed, as they are in the CSV tools:
8080is a number,trueis a boolean. 007stays a string. So does1e3, and anything else whose text carries more than its value.- Ambiguous scalars are quoted.
y,onandNOare strings to a YAML 1.2 reader and booleans to PyYAML, which reads YAML 1.1. Quoting exactly those keeps both readers in agreement. - An empty value is an empty string, not a null: the file says the key is there with nothing in it, and that is what the YAML says too.
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.