Properties to YAML Converter

Paste a Java `.properties` file (dot-notation `key=value` lines) and get back a properly nested YAML document, the reverse of what happens when YAML config gets flattened for `.properties`-only tooling. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Plenty of Java tooling still speaks `.properties`, flat, dot-notation key-value pairs, while modern configuration is increasingly written in YAML for its readability. This tool converts the flat format back into properly nested YAML, rebuilding the structure the dots imply.

It's the mirror image of this site's YAML-to-Properties tool: where that one flattens nested YAML into properties lines, this one takes those lines and reconstructs the nesting.

What Is Properties to YAML Converter?

A properties-to-YAML converter reads `key=value` (or `key:value`) lines and, treating every dot in the key as a nesting boundary, builds up a single nested JavaScript object representing the equivalent structure.

That object is then serialized as block-style YAML using the same stringifier every other tool in this category uses, so the result matches the formatting conventions of the rest of this site's YAML output.

How Properties to YAML Converter Works

Each non-blank, non-comment line is split at its first unescaped `=` or `:`. The key portion is split on dots to build a path (`config.retries` becomes the path `["config", "retries"]`), and intermediate objects are created as needed while walking that path, with the value set at the final segment.

Because every `.properties` value is plain text, values are kept as strings throughout, and the YAML stringifier automatically quotes any value that would otherwise be misread as a different type (like the text `false` or `3`) when the resulting YAML is parsed again.

When To Use Properties to YAML Converter

Use it when migrating a legacy `.properties` config into a YAML-based project, like moving a Spring Boot app from `application.properties` to `application.yml`.

It's also useful for quickly visualizing the nested shape a flat properties file implies, before committing to a full migration.

Features

Advantages

  • Reconstructs nested structure automatically from dot-notation keys, no manual re-indentation needed.
  • Correctly quotes ambiguous values so round-tripping through YAML doesn't silently change their type.
  • Supports both `=` and `:` separators and skips comment lines, matching real `.properties` file behavior.
  • Runs entirely client-side, so configuration values never leave your browser.

Limitations

  • Comments in the source `.properties` file are dropped, since YAML comments and `.properties` comments aren't part of either format's data model in this tool's round trip.
  • Numeric-looking dot segments (like `roles.0`, `roles.1`) become object keys `"0"`, `"1"` rather than being reconstructed as an actual YAML sequence, since the properties format itself has no way to distinguish 'this was a list' from 'this was an object with numeric keys.'
  • If two properties define conflicting types for the same path (one line treats `config` as a scalar, another treats `config.x` as nested), the later line in the file wins and earlier data at that path is overwritten.

Examples

Dot-notation properties to nested YAML

Input

config.debug=false
config.retries=3

Output

config:
  debug: "false"
  retries: "3"

Both keys share the `config` prefix and are merged into one nested mapping, with values kept as quoted strings.

Comments are skipped

Input

# environment settings
name=api

Output

name: api

The comment line contributes nothing to the output, matching standard `.properties` parsing.

Best Practices & Notes

Best Practices

  • Review the output for keys like `roles.0` that were originally meant as list indices, since they'll come back as object keys, not a YAML sequence, and may need manual conversion.
  • Run the result through the YAML Formatter afterward if you want to double check indentation consistency.
  • Keep the original `.properties` file until you've confirmed the converted YAML is being read correctly by your application.

Developer Notes

The parsing logic is a direct adaptation of this site's Properties-to-JSON converter, with the final `JSON.stringify` call swapped for `toBlockYaml` from the shared `yaml-core` module. Because every parsed value stays a string, YAML's automatic quoting of ambiguous scalars is what keeps the round trip type-safe, not any type inference on this tool's part.

Properties to YAML Converter Use Cases

  • Migrating a Spring Boot application.properties file into application.yml
  • Converting legacy Java configuration into a YAML-based deployment pipeline
  • Visualizing the nested structure implied by a flat properties file before refactoring it
  • Feeding properties-derived configuration into tooling that expects YAML input

Common Mistakes

  • Expecting numeric dot segments (`list.0`, `list.1`) to become a YAML sequence automatically, they become an object with string keys `"0"` and `"1"` instead.
  • Forgetting that every converted value is a string, even ones that look like numbers or booleans, until you manually adjust the YAML.
  • Mixing `=` and `:` separators inconsistently and being surprised when a value contains an unescaped colon that wasn't intended as the separator.

Tips

  • If your properties file uses `list.0`, `list.1` keys, expect to manually convert those nested objects into YAML sequences after conversion.
  • Use Sort YAML afterward if you want the reconstructed mapping's keys in alphabetical order rather than properties-file order.
  • Pair with YAML to Properties to verify a full round trip for a specific file before trusting the migration.

References

Frequently Asked Questions