Skip to content
DevToolsCave

    This tool runs entirely in your browser. Nothing you paste is uploaded.

    How you can check →

    Properties to YAML

    Config & Infra

    Convert application.properties into YAML in your browser — with your comments kept, and every value that would have changed meaning named on screen.

    YAML
    The YAML appears here.

    What the conversion cost

    Converting application.properties to YAML

    Moving a Spring Boot application from application.properties to application.yml looks like a formatting change and is not. Both files feed the same binder, but they disagree about what a value is: a properties file has no types at all, and YAML has a great many. The conversion is where that disagreement is settled, and every place it is settled badly is a difference in how your application behaves that no compiler will catch.

    This converter runs entirely in your browser, keeps your comments, and — the part no other tool in this space does — tells you what the conversion cost. Every value it had to quote, and the reason, appears in the panel beside the output.

    The four traps this file walks into

    • The Norway problem. Spring Boot reads YAML with SnakeYAML, which implements YAML 1.1. In 1.1, no is the boolean false — and so are off, n and NO. A country code, a feature flag or a two-letter locale written bare stops being the text you wrote. Values are quoted wherever that would happen.
    • Leading zeros are octal. 0755 in YAML 1.1 is the number 493. File modes, zero-padded account codes and PINs all convert into a document that states different numbers, silently.
    • Structural conflicts have no YAML form. A properties file holds a=1 and a.b=2 quite happily. YAML cannot: a is either a value or a group of keys. Rather than picking one and dropping the other, this tool refuses and cites both lines.
    • List indices must be contiguous. Spring Boot requires a[0], a[1], a[2] with no gaps and throws at startup otherwise. a[0] beside a[2] is therefore a crash that can be predicted from the text, and it is reported here.

    Why the parser is not a split on "="

    java.util.Properties is fiddlier than it looks, and this tool reproduces it character for character. The separator is the first unescaped =, : or whitespace, so server port 8080 is a valid entry. A line ending in an odd number of backslashes continues onto the next one. An unrecognised escape such as \q quietly drops its backslash — which is why path=C:\temp is read by Java as C: followed by a tab, and why this tool warns about it. Duplicate keys silently last-win, which in a 400-line file is often a live bug nobody has noticed.

    Dotted keys, and the ambiguity nobody can resolve

    logging.level.org.springframework.web=DEBUG is either five levels of nesting or logging.level holding the single literal key org.springframework.web. Both bind identically in Spring and they are different documents to everything else, so there is no correct answer available from the input. This tool splits on dots, honours Spring's [literal.key] bracket escape exactly, and adds a note — not a warning — wherever a split happens under a prefix Spring binds as a map. The Keep flat box writes those prefixes the other way.

    Common uses

    • Migrating a Spring Boot service from properties to YAML during an upgrade
    • Splitting a profile-laden file on #--- into real YAML documents
    • Auditing an existing properties file for duplicate keys and index gaps before converting
    • Checking which values a YAML parser would silently retype

    What this tool does not claim

    The check beside the output verifies that every key and value survives being nested and un-nested — nothing is lost, renamed or merged. It is deliberately not described as a full round trip, because reading the YAML back with a YAML parser is a separate check and it arrives with the reverse converter. Claiming a check that has not been run is exactly the kind of quiet dishonesty this site exists to avoid.

    Frequently asked questions

    Why is my port quoted?
    A .properties file has no types — server.port=8080 is the four characters "8080", not a number. Writing port: 8080 in YAML would be this tool inventing a type the file never had, so the default is to keep every value as text. Switch Values to "infer types" and 8080 becomes a number, along with anything else that reads back as the exact same characters.
    What happened to my value of no?
    Nothing, which is the point. Spring Boot uses SnakeYAML, a YAML 1.1 parser, and YAML 1.1 reads a bare no as the boolean false. Writing feature.region: no would change what your application does, so the value is quoted and the receipt says why. The same applies to yes, on, off, y, n, null and ~.
    Why did 0755 stay text even with type inference on?
    Because YAML 1.1 reads a leading zero as octal, so 0755 is the number 493. The rule for inferring a type is that the value must write back out as the identical characters — 8080 does, 0755 does not, and neither does 1.20 or a 20-digit account number. Anything that would change stays quoted.
    Do my comments survive?
    Yes. A block of comments above a key travels with that key, and lands on the outermost level that key creates — so # HTTP above server.port ends up above server: in the YAML. Blank lines are kept too. This is the single most requested thing these converters do not do.
    Is logging.level.org.springframework.web five levels or one key?
    Both are correct and Spring binds them identically, so there is no answer available from the file alone. This tool splits on dots and adds a note wherever it does so under a prefix Spring binds as a map. If you want the flat form, put logging.level in the Keep flat box and the remainder is written as one quoted key.
    What is #--- and why did nothing happen to it?
    Since Spring Boot 2.4, #--- separates documents inside one .properties file, and it maps exactly onto YAML's ---. It is deliberately a comment so that java.util.Properties and IDE tooling keep working, which also means splitting on it changes what the file means to anything that is not Spring. Tick “Split on #---” to turn one file into several YAML documents.
    Does my file leave my browser?
    No. The parser, the converter and the check all run in this tab. Nothing is uploaded, logged or stored, and you can confirm it by opening the Network tab before you paste.