Convert between Spring Boot .properties and YAML, handles nesting and arrays.

Switch tool
Properties0 chars · 0 lines
YAML0 chars · 0 lines

How to use

Purpose

Spring Boot config converter between application.properties and application.yml. Converts a.b.c=value dot-notation flat structure to YAML nesting, and vice versa. Preserves comments (# single-line), string-value quoting, arrays (list[0]=x to list: [...]), complex nesting. Common in Spring Boot / Quarkus / Micronaut migration from properties to yml, reading complex configs in alternate view, code review. All conversion runs locally.

Steps

  1. Paste application.properties or application.yml
  2. Tool auto-detects format (a.b=x vs a:\n b: x)
  3. Right pane shows the other format in real time
  4. properties → yml: a.b.c=val becomes nested a → b → c: val
  5. yml → properties: nested structure flattens to dot-notation
  6. Arrays: myList[0]=a / myList[1]=b becomes myList: [a, b]
  7. Comments: # in properties preserved as YAML comments
  8. Quoting: escape sequences (\n \t) in properties correctly handled

FAQ

Spring Boot: properties or yml?
New projects prefer yml: nesting is clearer, multiple profiles in one file, no duplicate prefixes. Legacy projects can keep properties (migration cost not worth it). yml pitfalls: indent must be spaces (no tabs); "yes"/"no" can parse as booleans (quote them). properties advantages: each line independent, diff-friendly, easy for newcomers. Performance is the same.
Multi-profile (dev/prod) handling?
properties: application-dev.properties + application-prod.properties, split by file. yml: one application.yml with --- separators per document, each specifying spring.profiles. yml multi-document is cleaner because profile-specific and default configs sit together.
What if a config value contains a colon?
yml uses colon as key-value separator. Values containing colons must be quoted (e.g., URL "http://example.com" needs double quotes). properties has no issue (= as separator, anything after). The tool auto-quotes values with special chars during conversion.
@PropertySource cannot read .yml files?
Right — @PropertySource defaults to .properties only, not yml. application.yml is loaded via a special mechanism, but @PropertySource("classpath:custom.yml") will not work. Solutions: 1) use .properties files; 2) implement a custom PropertySourceFactory; or 3) consolidate all config into application.yml.
How do environment variables override config?
Spring Boot supports env-var override: `spring.datasource.url=jdbc:...` corresponds to SPRING_DATASOURCE_URL (dots to underscores, all uppercase). Same for yml. Docker/Kubernetes deployments commonly use ConfigMaps / env vars to override defaults.

Use cases

  • Spring Boot migration from properties to yml
  • Reading complex configs: deeply nested yml to flat properties for overview
  • Code Review: properties single-line diff-friendly; yml nesting shows structure
  • Config documentation generation
  • Kubernetes ConfigMap embedding of application.yml

Use cases

Spring Boot / Quarkus / Micronaut config migration, reading, code review, automated docs, K8s ConfigMaps. Java backend, DevOps. Comment preservation, array conversion, quoting, nested expansion are the differentiators.