ToolConvoyToolConvoyv2.6
DEV

YAML to Properties — Convert YAML Config to Java .properties Format

Convert YAML configuration to Java .properties format. Handles dot-notation nesting, multi-line values, and Unicode escaping. Runs client-side.

● LOCAL · GENERATED IN YOUR TAB0 network requests from tools since page load

YAML to Properties

Convert YAML configuration to Java .properties format. Flattens nested YAML into dot-notation properties. Works entirely in your browser.

Java .properties files are the oldest configuration format still in widespread production use. They predate YAML, JSON, and XML as configuration languages — the java.util.Properties class was part of JDK 1.0 in 1996 — and they are still the default format for Spring Boot’s application.properties, for internationalisation resource bundles, and for configuration in most Java-based systems that have not explicitly migrated to YAML. The format is a strict key=value pair per line, sometimes with : as an alternative delimiter, and comments start with # or !. The flat structure means that a YAML file with nested configuration sections must be flattened into dot-notation keys, arrays must be expanded into indexed keys, and any Unicode characters outside ISO 8859-1 must be escaped to \uXXXX sequences.

The main reason to convert YAML to properties is migrating a Spring Boot application. Spring Boot added YAML support in 2014 with application.yml, and the YAML format quickly became the preferred choice for new projects because of its cleaner syntax, native nesting, and support for anchors and aliases. But many enterprise Spring projects started before 2014 and use .properties files with a deeply entrenched build pipeline, a properties-based configuration server, or a deployment tool that only reads .properties. Converting a application.yml to application.properties unblocks the migration without rewriting the deployment infrastructure.

For a final hand-off: if the output .properties file is going into a Spring Boot project, check that any Spring-specific YAML features (profile-based document separators, spring.config.import references, or @activated@ Maven filtering tokens) are handled correctly in the properties equivalent. If you need the reverse conversion (properties to YAML), the Properties-to-JSON tool converts .properties to JSON first, and the JSON-to-YAML tool completes the chain. For other configuration formats that Java projects use, the INI-to-JSON tool covers INI files and the TOML Tools cover TOML, which is Spring Boot’s third supported config format.

Advertisement

How to use

  1. Paste your YAML config

    Drop a YAML configuration file into the input. The parser reads YAML 1.2 and flattens nested mappings into dot-notation keys. Arrays are expanded with index notation: `servers[0].host`.

  2. Review the flattened keys

    The converter shows each key-value pair as it will appear in the .properties file. Nested YAML becomes parent.child.grandchild=value. Arrays become indexed keys. Unicode characters outside Latin-1 are escaped to \uXXXX sequences.

  3. Download the .properties file

    Download as a .properties file with ISO 8859-1 encoding (the .properties standard) or UTF-8 (modern Java). The output includes a timestamp comment header and preserves the original key ordering.

Frequently asked

How are YAML arrays converted to the .properties flat format?

YAML arrays are flattened with zero-based index notation. `servers: [host1, host2]` becomes `servers[0]=host1` and `servers[1]=host2`. Arrays of objects become `servers[0].host=host1`. The bracket-index convention is the most common Java properties consumer pattern.

What encoding does the output .properties file use?

Default is ISO 8859-1 with Unicode escape sequences (\uXXXX). This is the historic .properties standard defined in the Java Properties API. Toggle to UTF-8 mode for modern Spring Boot applications that read UTF-8 properties natively.

How does the converter handle YAML multi-line strings?

YAML folded scalars (`>`) and literal block scalars (`|`) are joined into a single line in the .properties output with ` ` escape sequences for line breaks. A `\` continuation character for long lines is added if the value exceeds 80 characters.

Does the converter preserve YAML comments in the properties output?

YAML comments (`# comment`) are preserved as properties comments (`# comment`) at the same position relative to the key they annotate. Comments that appear between mapping entries are placed before the corresponding properties key.

Limitations

  • No Spring profile conversionYAML files with Spring-style `spring.profiles` keys or YAML document separators for multi-profile configuration are converted as a single flat file. Use Spring Boot's `spring.profiles.active` property instead to select profiles.
  • Deep nesting produces long key namesA YAML structure 8 levels deep produces keys like `app.component.subcomponent.feature.setting.option=value`. Java's `Properties` class and most Spring property resolvers accept these, but readability suffers.
  • Multi-document YAML is not mergedMulti-document YAML files (separated by `---`) are converted as separate .properties files, not merged. The conversion dialog lets you pick which document to convert.

Platform notes

macOS
Spring Boot on macOS reads .properties files natively. The browser tool is the right pick for converting YAML Spring config to .properties when migrating from a YAML-based project to a legacy .properties-based codebase.
Linux
CLI equivalent: `yq eval -o props input.yaml` handles simple key-value mappings. The browser tool adds multi-line value handling, Unicode escaping, and array index notation that yq's props output lacks.
Web
All YAML parsing and properties generation runs client-side. No configuration data leaves your browser — safe for converting internal application config.
Advertisement
Advertisement