YAML to Property Converter

YAML Input

Property Output

How this YAML to Properties converter works

Paste a nested YAML file (such as Spring Boot’s application.yml) into the left editor to flatten every key path into Java .properties key=value lines on the right. Everything runs 100% in your browser — the YAML you paste never leaves your machine. Converting the other way? Use the Property to YAML Converter.

How nested YAML flattens into .properties

YAML Structure Flattened .properties Output
Nested maps spring: → application: → name: billing spring.application.name=billing
List of scalars tags: [a, b] tags[0]=a and tags[1]=b
List of objects nodes: → - host: n1 nodes[0].host=n1
Booleans & numbers port: 8080, ssl: true port=8080, ssl=true
Empty / null values key=null (or empty string)

Why teams convert YAML back to .properties

  • Spring @PropertySource compatibility: Classic Java java.util.Properties and Spring @PropertySource load .properties files natively without extra YAML factories.
  • Safer line-by-line diffs & grep: Searching grep "datasource.url" application.properties returns the exact full key on one line, with zero risk of accidental indentation bugs during merges.
  • CI/CD & Kubernetes ConfigMap overrides: Passing flattened keys into Java -Dkey=value JVM arguments or Spring Boot CLI overrides is straightforward once flattened.

Common pitfalls to watch for

  • Multi-profile YAML (--- documents): If your application.yml uses --- separators for spring.config.activate.on-profile, convert each profile block into its own application-dev.properties / application-prod.properties file.
  • Multiline strings: YAML block scalars (|) contain literal newlines. In Java .properties only \n keeps a newline inside a value; a trailing backslash \ just continues the entry on the next line, joining the lines without one. The converter writes each newline as \n (and a backslash as \\), so a multiline value stays on its own line.
  • Order-sensitive lists: Flattened list indexes (servers[0], servers[1]) must stay contiguous starting at 0 in Spring Boot relaxed binding.

FAQs

Does this converter support Spring Boot lists and nested objects? Yes. Nested maps flatten into dot-separated keys (a.b.c=value) and YAML lists flatten using zero-based bracket notation (items[0]=foo, items[0].name=bar), matching Spring Boot’s .properties binding format.
Is my YAML configuration sent to any server? No. Both YAML parsing and property flattening execute locally inside your browser tab.
Can I convert YAML to JSON or JSON to Properties too? Yes — use the YAML to JSON Converter or JSON to Property Converter directly from the links below.

More Free Developer Tools