Skip to content

Spring properties to YAML converter

Paste application.properties. The matching application.yml is written beside it.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

YAML indent
application.properties
application.yml

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste the contents of application.properties, or load the sample.
  2. Read the YAML. Keys that share a prefix, such as spring.datasource, are grouped under one parent.
  3. Download application.yml and remove the .properties file, or keep only one of them so values are not set twice.

Supported formats and limitations

  • Follows the Java properties format: = or : or a space separates the key, # and ! start comments, and a trailing \ continues the line.
  • Whole numbers and true or false become YAML numbers and booleans. Values with a leading zero, such as 08080, stay quoted strings.
  • A repeated key keeps its last value, as Spring does, and a notice gives both line numbers.
  • Comments are dropped.
  • A key such as app.map[a.b] keeps a.b as one map key.

Examples

A list

app.origins[0]=a and app.origins[1]=b become a YAML list under app.origins.

app.origins[0]=a
app.origins[1]=b

A continued line

The backslash joins the lines, and leading spaces on the next line are removed.

app.message=Hello \
    World

Common errors and solutions

needs "a" to be a map, but an earlier line made it a value.
One line sets a=1 and another sets a.b=2. YAML cannot hold both, so rename one of the keys.

FAQ

Does Spring Boot read the result as the same settings?
Yes. Spring flattens application.yml back to the same dotted keys, so server: port: 8080 is read as server.port=8080.
What about ${placeholders}?
They are copied as text. Spring resolves them the same way in YAML.
Is the file uploaded?
No. It is converted in your browser.

Related tools

  • YAML to Spring properties converter

    Convert Spring Boot application.yml to application.properties in the browser. Nested keys are joined with dots and lists use [index].

  • YAML validator

    Check YAML syntax without converting or rewriting it. Errors include a line and column when the parser provides them, and valid input is left unchanged.

  • YAML formatter

    Reformat YAML with consistent 2- or 4-space indentation in the browser. Comments, quotes, anchors, and multiple documents are kept.