FormatterHQ

Properties to YAML Converter

Paste application.properties and get the equivalent application.yml. Dotted keys are nested, key[0] indexes become YAML lists and Unicode escapes are decoded.

Input INI
Output YAML
Ready.

How to use the Properties to YAML Converter

  1. Paste your application.properties (or any .properties file) into the input editor.
  2. Keep Convert numbers & booleans on for native YAML types, or turn it off to keep every value as a string.
  3. Click Convert.
  4. Review the YAML, then save it as application.yml in src/main/resources.

Convert application.properties with the properties to YAML converter

This properties to YAML converter turns a Java .properties file into YAML by splitting each dotted key into a nested mapping. It is built for the most common case: migrating a Spring Boot project from application.properties to application.yml, where long repeated prefixes like spring.datasource. collapse into one readable block.

Why switch to application.yml?

Spring Boot loads both formats and treats them the same, so the change is about maintainability:

  • Shared prefixes are written once, which makes large files easier to scan and review.
  • Lists are real YAML sequences instead of [0], [1] keys.
  • Several profiles can live in one file, separated by --- with spring.config.activate.on-profile.

The trade-off is that YAML is indentation-sensitive, and a single misplaced space moves a key under the wrong parent. Converting automatically avoids the typos that come from rewriting a hundred keys by hand.

Example

Input:

spring.application.name=orders
spring.datasource.url=jdbc:postgresql://localhost:5432/orders
spring.datasource.username=orders
spring.jpa.show-sql=true
server.port=8081
management.endpoints.web.exposure.include=health,info
spring.profiles.active[0]=dev
spring.profiles.active[1]=metrics
app.version=1.10
app.greeting=Hej, V\u00e4rlden

Output:

spring:
  application:
    name: orders
  datasource:
    url: jdbc:postgresql://localhost:5432/orders
    username: orders
  jpa:
    show-sql: true
  profiles:
    active:
      - dev
      - metrics
server:
  port: 8081
management:
  endpoints:
    web:
      exposure:
        include: health,info
app:
  version: 1.1
  greeting: Hej, Världen

All spring.* keys are grouped under one spring: block even though spring.profiles.active came later in the file. The indexed keys became a YAML list, and the \u00e4 escape was decoded to ä, since YAML files are read as UTF-8.

The typed values option

With Convert numbers & booleans on, 8081 and true are written as native YAML scalars, which Spring binds just as it binds the text versions. Look closely at version-like values, though: app.version=1.10 became 1.1 in the example. If a value must stay exactly as written, turn the option off, and every value is written as a string, with quotes where YAML would otherwise change its meaning (version: '1.10', enabled: 'on').

Edge cases

  • A key that is both a value and a parent. Properties allow logging.level=DEBUG and logging.level.root=INFO side by side, but YAML cannot give level a value and children at once. The later line wins, so rename one key before converting.
  • Numeric segments without brackets, like servers.0=a, become mapping keys ("0": a) rather than a list. Use servers[0] if you want a sequence.
  • Comma-separated values such as health,info stay single strings. Spring splits them when binding to a list, so this is safe.
  • Placeholders like ${DB_PASSWORD} are copied unchanged; Spring resolves them at runtime in either format.
  • Comments (# and ! lines) are not carried over. Add them back to the YAML where they still matter.
  • Continuation lines ending in \ are joined before conversion, so long values arrive as one YAML string.

Related tools

Moving the other way, for example to set properties from a CI system, use YAML to Properties. For JSON output, try Properties to JSON, and check the finished file with the YAML validator.

Privacy

The conversion runs entirely in your browser. Datasource URLs, usernames and passwords in your properties file are never uploaded.

Frequently asked questions

Does Spring Boot read application.yml the same as application.properties?
Yes. Spring Boot loads both and binds them to the same property names. If both files exist in the same location, the properties file takes precedence for keys defined in both, so delete the old file after migrating.
How are list properties like key[0] converted?
Bracket indexes become YAML sequences, so spring.profiles.active[0]=dev and [1]=metrics turn into a list with two items. Plain dotted numbers such as key.0 become mapping keys instead.
Why did one of my properties disappear?
It was probably both a value and a parent, such as logging.level and logging.level.root. YAML cannot represent both, so the later line wins. Rename or remove one of the keys before converting.
Are comments preserved?
No. Comment lines are skipped when the properties file is parsed, so they do not appear in the YAML. Copy important comments over by hand.
Can I keep every value as a string?
Yes. Turn off Convert numbers & booleans. Values that YAML would otherwise read as numbers or booleans are then quoted, for example '1.10' or 'on'.

Last updated September 26, 2026

Related tools