YAML ⇄ Properties Converter
Convert between YAML and Java .properties both ways.
What is YAML ⇄ Properties Converter
The YAML ⇄ Properties converter transforms YAML into Java .properties (nested keys flattened dot-style, arrays as key.0) and .properties back into YAML, auto-typing numbers and true/false. Handy for comparing Spring Boot application.properties against application.yml. Runs entirely in your browser.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
Two formats with incompatible ideas about keys
YAML nests; .properties is a flat key=value list where hierarchy exists only by convention — a.b.c=1 has no relationship to any a or a.b key. Converting downward is lossless if the nesting is joined with dots, and converting back relies on those dots to rebuild the tree, which fails for any key that legitimately contains a dot.
So a round trip is only guaranteed for data that was generated from the other side. Real .properties files written by humans routinely contain keys like user.name where the dot is part of the name rather than a path separator, and the tree that comes back is wrong in a way that only shows up at runtime.
Encoding rules that surprise people
The .properties specification reads files as ISO-8859-1 with \uXXXX escapes for everything else, so non-Latin text must be escaped or the file must be read with an explicit UTF-8 charset by the consuming library. Modern Java does the latter by default; older tools do not, and the result is mojibake that looks like a locale problem.
Line continuation is a trailing backslash, and whitespace around the = is significant in some parsers. A formatter that tidies spacing can therefore change a value that intentionally begins with a space.
Duplicates and ordering
In .properties the last definition of a key wins, silently. YAML rejects duplicate keys outright. Converting a file with duplicates to YAML produces an error, and converting back produces a file with one fewer line than you started with — check the key count on both sides.
Order is preserved by neither format's specification, but both preserve it in practice in every common implementation. If a downstream tool diffs these files, keep the order stable by editing in place rather than regenerating from a tree.
How to use it
- 1.Paste YAML or .properties
- 2.Pick the direction
- 3.Run and copy the result
How YAML ⇄ Properties Converter works under the hood
Formatters parse your input into a structure, then serialise it back with consistent indentation. That is why a formatter can also reveal a syntax error: if it cannot parse, it cannot print.
- 1
Parse into a tree
JSON goes through JSON.parse; YAML, XML, CSS and SQL use their own parsers. The parse either succeeds with a structure or fails at a line and column.
- 2
Serialise with a fixed style
Indentation width, key order and quoting are applied deterministically, so formatting the same input twice gives identical bytes.
- 3
Show the error position
When parsing fails, the message includes the position so the fix is obvious instead of guessed.
Processing pipeline
Formatting is not validation
A formatter proves the document is syntactically parseable. It does not prove it is valid against a schema, and it does not check business rules. JSON with a duplicated key parses fine and silently keeps the last value.
What gets normalised
Comments are preserved in CSS and SQL but not in JSON, which has no comment syntax. YAML anchors may be expanded, and quote style may change. Keep the original when exact byte layout matters, such as signed payloads.
Verify it yourself
Formatting is deterministic and local — run it twice and compare.
- 1.Open DevTools on this page and switch to the Network tab
- 2.Keep the filter on Fetch/XHR and run the tool
- 3.Confirm no request carries your file — you should see only page assets and fonts
Frequently asked questions
How are arrays handled?
YAML → properties flattens arrays as my.list.0 = x. The reverse direction keeps numeric keys as object keys (no array rebuild).
Is typing automatic?
Only properties → YAML: numbers and true/false become typed values; everything else stays a string.
What this kind of conversion cannot keep
Formatters parse the input into a tree and print it back with consistent indentation. If the input is invalid, you get the parser's error position instead of a silently mangled file — malformed JSON stays malformed rather than being «repaired» into something that is no longer yours.
More in Format
On this page
- What is YAML ⇄ Properties Converter
- What this tool actually does with your file
- How it actually behaves
- How to use it
- How it works inside
- Frequently asked questions
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →