Skip to content
ToolPlankDEV
Developer Tools
100% In-Browser Execution

Updated:

YAML to Properties Converter

Paste YAML and get a .properties file as you type. This yaml to properties converter flattens nested keys, writes lists in Spring style, resolves anchors and merge keys, handles several documents and points to the line and column of any error. Nothing is uploaded.

Options:

YAML

Input
0 chars · 0 lines

Properties

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Notes

Documents, empty values and keys that contain dots are listed here when there are any.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use YAML to Properties

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your YAML

    Paste it into the left box, press Paste, or open a .yml or .yaml file. Sample loads an application.yml with two documents. Compose style and Messages load smaller examples.

  2. 02

    Read the properties and the notes

    The properties file appears on the right as you type. The Notes panel lists documents, empty values and keys that contain dots. A YAML mistake is reported with its line and column.

  3. 03

    Choose how it is written

    Pick indexed list keys or comma-joined lists, one document or all of them, UTF-8 text or \uXXXX codes, and how line breaks in a value are written. Sort keys if you want alphabetical order.

  4. 04

    Copy or download

    Press Copy to paste the result into your project, or Download to save it as application.properties.

How to convert YAML to properties

A .properties file is a flat list of key=value lines. YAML nests keys inside each other. To convert yaml to properties, the tool joins the names of every level with dots, so a port inside a server group becomes server.port.

This YAML has a number, a list and a text block:

yaml
server:
  port: 8080
app:
  version: 1.0
  origins:
    - https://example.com
    - https://admin.example.com
  motd: |
    Welcome
    to the shop

The converter writes:

properties
server.port=8080
app.version=1.0
app.origins[0]=https://example.com
app.origins[1]=https://admin.example.com
app.motd=Welcome\nto the shop\n

Notice that 1.0 stays 1.0. Numbers and booleans are written exactly as they appear in the YAML, so a version number is not turned into 1. The text block ends with a line break, and that break is kept as \n.

Convert application.yml to application.properties for Spring Boot

Spring Boot reads application.yml and application.properties with the same key names, so the flat keys here are the ones your code binds. To convert application.yml to application.properties, paste the file and download the result as application.properties.

Lists use the indexed form, such as app.origins[0]. Spring Boot reads that form for lists of text and for lists of objects. If you prefer one line for a list of plain values, switch Lists to Comma joined. A list whose items contain commas, spaces at the edges or line breaks falls back to indexed keys, and the notes say so.

Several documents and profiles in one YAML file

A YAML file can hold several documents separated by a --- line. Spring Boot uses this to put profile settings in one file. With Document set to all, each document is written in turn and a #--- line is put between them. Spring Boot 2.4 and later reads #--- as a document break in a properties file.

properties
a=1
#---
spring.config.activate.on-profile=prod
server.port=80

The Documents list in the notes shows each document's number, its key count and its profile name when it has one. To get a single file for one profile, type its number into Document, for example 2. An empty document, such as a lone --- at the end of the file, is skipped.

Anchors, merge keys and empty values

Anchors and aliases are resolved, and so are merge keys written as <<: *name. Keys written next to a merge key win over merged ones, as in YAML itself.

yaml
base: &base
  retries: 3
server:
  <<: *base
  port: 80
properties
base.retries=3
server.port=80
server.retries=3

A properties file has no null. An empty or null value is written as a key with nothing after the equals sign, and the notes list it with its line number. An empty map or list is written the same way and listed too. An alias that points to an anchor that does not exist stops the conversion with a message that names it.

Escaping, UTF-8 and multi-line text

Inside keys the tool escapes spaces, equals signs, colons and a leading # or !. In values it escapes backslashes, line breaks, tabs and a leading space. Other characters, including = and :, are left alone so the file stays readable.

Spring Boot reads properties files as UTF-8, so the default keeps accents and other scripts as they are. Older Java code that loads a file as Latin-1 needs \uXXXX codes instead. Set Non-ASCII characters to Write as \uXXXX and the word café becomes caf\u00E9, a Chinese character becomes \u4E16 and an emoji becomes a surrogate pair.

properties
name=caf\u00E9
zh=\u4E16\u754C

Text with line breaks is written on one line with \n by default. The Continuation lines option writes each line on its own row, ending with a backslash, which is easier to read in a long message:

properties
motd=Welcome\n\
to the shop

Limits: what this converter does not do

  • A key that already contains a dot, such as "a.b", is written as it is. Spring reads it as a path, and the notes warn you.
  • Placeholders like ${name} stay as text. Nothing is resolved.
  • Custom YAML tags are ignored and their values kept as plain text.
  • A file that expands to more than 300,000 lines through aliases is refused, because that size usually means an alias loop.
  • Environment-variable style names such as SERVER_PORT are not produced.

To go the other way, use Properties to YAML.

Privacy

Config files often hold passwords and tokens. The conversion runs in your browser and the text is not uploaded. The Privacy Policy explains what the site stores. Replace real secrets with placeholders before you share a file.

Try YAML to JSON and JSON to YAML for JSON configs, and TOML to JSON when a project uses TOML.

Frequently Asked Questions

Technical Q&A for YAML to Properties

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the YAML into the left box, check the Notes panel, then press Download to save the result as application.properties. The dotted keys match the names your Spring Boot code binds.

They hold the same settings in different shapes. A properties file is a flat list of dotted keys, and YAML nests them and can hold several documents in one file. Spring Boot reads both formats.

As indexed keys, such as origins[0] and origins[1], which Spring Boot reads. For plain values you can switch to one comma-separated line, such as origins=a.com,b.com.

With Document set to all, every document is written and separated by a #--- line, which Spring Boot 2.4 and later reads. Type a number such as 2 to convert only that document.

The properties format gives backslash, line breaks, tabs, a leading space and the key separators a special meaning, so they are escaped. Non-ASCII characters can also be written as \uXXXX codes if your Java code does not read UTF-8.

A properties file has no null, so the key is written with nothing after the equals sign and listed in the notes with its line number. Empty maps and lists are handled the same way.

Yes. Numbers, booleans and dates are written as they appear in the YAML, so 1.0, 0x10 and yes are not changed.

Yes. Aliases are expanded and <<: *name merges are applied, with the keys written beside the merge taking priority. An alias with no matching anchor is reported as an error.

No. The tool writes dotted property keys only. Spring Boot can map SERVER_PORT to server.port at run time, so you can set that variable without a converted file.

No. The conversion runs in your browser and nothing is sent to a server. Replace real passwords and tokens with placeholders before you share any file.