What are YAML and .properties?
YAML describes the same data as JSON with indentation instead of brackets, allows comments and is the language of most configuration files. A .properties file is the Java configuration format: key=value lines whose dotted keys (spring.datasource.url) imply a hierarchy, with \uXXXX escapes for non-ASCII text.
The reverse Spring Boot move: some tools, tests and @PropertySource only read .properties, so the YAML tree is flattened into dotted keys.
This page opens the data converter already set to YAML → .properties. Paste the text, read the result as you type, then copy it or download it as a file. Errors show the line and the column. Nothing is sent anywhere: the conversion runs in your browser.
YAML vs .properties
| YAML | .properties | |
|---|---|---|
| Extension | .yaml, .yml | .properties |
| Media type | application/yaml | text/x-java-properties |
| Comments | yes (#) | yes (# or !) |
| Data types | JSON types plus dates, anchors and aliases | text only |
| Nesting | any depth, by indentation | implied by dotted keys and [0] |
| Typical use | Kubernetes, Docker Compose, CI pipelines | Spring Boot, Java apps, i18n bundles |
| Specification | YAML 1.2.2 | java.util.Properties |
When to convert YAML to .properties
- Convert to .properties when a Spring Boot or Java app reads its settings from it.
- Keep YAML when people will read and edit the file by hand.
What changes in the conversion
- Comments of the YAML file are not carried over: the converter reads the data, and comments are not data.
- Nested keys become dotted keys (
spring.datasource.url) and list items[0],[1], the form Spring Boot reads. - Anchors and aliases (
&base,*base) are expanded into full copies.
How to convert YAML to .properties
- Paste your YAML in the input box (the page opens with an example you can replace).
- Read the .properties on the right; it updates as you type. If something is wrong, the message says the line and column.
- Adjust the options if you need: indentation, sorted keys or type detection.
- Copy the result or download it as a
.propertiesfile.
Example
This YAML input:
# orders service
app:
name: orders
port: 8080
database:
url: postgres://db:5432/orders
pool: 10
features:
- pix
- boletobecomes this .properties, exactly as the converter writes it:
app.name=orders
app.port=8080
database.url=postgres://db:5432/orders
database.pool=10
features[0]=pix
features[1]=boletoFrequently asked questions
Is my YAML sent to a server?
No. Conversion happens in your browser, so secrets in a config never leave your computer.
Does YAML to .properties keep comments?
No. Comments are dropped because the converter works on the data itself. Copy important comments by hand.
What happens to nested data?
YAML nesting: any depth, by indentation. .properties nesting: implied by dotted keys and [0]. The tree is flattened into one key per value, as shown in the example.