Spring Boot
Convert application.properties into application.yml while keeping dot-separated keys nested and scalar values safely quoted.
propstoyaml.com
PropsToYaml converts `.properties` files into YAML locally in your browser, with no uploads, no tracking, no remote scripts, and clear checks you can run before pasting sensitive configuration.
Useful when moving configuration between Spring Boot `application.properties` and `application.yml`, MuleSoft properties and YAML configuration, Java resource bundles, Gradle or Maven-era config, and other JVM tools that still use dot-separated property keys.
server:
port: "8080"
spring:
application:
name: local-converter
datasource:
url: jdbc:postgresql://localhost:5432/app
username: app_user
feature:
flags:
newCheckout: "true"
message:
welcome: "Hello World"
Conversion rules
Common use cases
Convert application.properties into application.yml while keeping dot-separated keys nested and scalar values safely quoted.
Reshape Mule app properties into YAML-style configuration before copying values into deployment or environment config.
Handle JVM service config, resource-style property files, and old key/value settings that need cleaner YAML structure.
Prepare values for CI/CD, Kubernetes ConfigMaps, Helm values, Docker Compose, or other YAML-heavy workflows.
No upload path
Disconnect from the internet, or open DevTools Network and set the tab to Offline.
Paste a harmless sample first and confirm the Network panel stays empty.
View the converter source below: it only reads text from the textarea and writes YAML back to the page.
Clear the fields or close the tab when finished; no storage APIs are used.
The converter runs entirely in React state in this browser tab. By default it follows `propstoyaml.java`: `key=value` lines, `#` comments, dot-key nesting, and quoted boolean/numeric scalars. Optional controls can expand parsing to `!` comments, `:` or whitespace separators, escaped characters, unicode escapes, and continuation lines. There are no fetch calls, analytics, remote scripts, or localStorage/sessionStorage writes.
const defaultOptions = {
// Match propstoyaml.java unless the user changes controls.
separatorMode: "equals",
commentMode: "hash",
escapeMode: "preserve",
quoteBooleans: true,
quoteNumbers: true,
quoteYamlWords: true
};
function propertiesToEntries(input, options) {
// Step 1: split the pasted text into lines.
// Decode mode also joins Java .properties continuation lines.
const lines = options.escapeMode === "decode"
? joinContinuationLines(input)
: input.replace(/\r\n?/g, "\n").split("\n");
const entries = [];
for (const rawLine of lines) {
// Step 2: trim each line and ignore blanks/comments.
const line = rawLine.trim();
if (!line || isComment(line, options.commentMode)) continue;
// Step 3: find the key/value separator.
// Default mode only accepts key=value, matching propstoyaml.java.
const separatorIndex = options.separatorMode === "equals"
? line.indexOf("=")
: findSeparator(line);
if (separatorIndex === -1) continue;
// Step 4: trim the key and value around the separator.
const key = line.slice(0, separatorIndex).trim();
const value = line.slice(separatorIndex + 1).trim();
// Step 5: optionally decode escaped characters before storing.
entries.push(options.escapeMode === "decode"
? { key: decodePropertiesEscapes(key), value: decodePropertiesEscapes(value) }
: { key, value });
}
return entries;
}
function propertiesToYaml(input, options = defaultOptions) {
// Step 6: convert flat key/value entries into a nested object.
const entries = propertiesToEntries(input, options);
const tree = entriesToObject(entries); // split dot keys into nested objects
// Step 7: render the nested object as YAML text.
return objectToYaml(tree, options);
}
function formatScalar(value, options) {
// Step 8: quote booleans so YAML keeps them as strings.
if (options.quoteBooleans && /^(true|false)$/i.test(value)) {
return JSON.stringify(value.toLowerCase());
}
// Step 9: quote numbers so ports, ids, and versions stay strings.
if (options.quoteNumbers && /^[+-]?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][+-]?\d+)?$/.test(value)) {
return JSON.stringify(value);
}
// Step 10: leave simple safe strings unquoted.
const safePlain = /^[A-Za-z0-9_./:*+-]+$/.test(value) && !value.startsWith("*");
const yamlWord = /^(null|yes|no|on|off)$/i.test(value);
// Step 11: quote everything else for YAML safety.
return safePlain && !(options.quoteYamlWords && yamlWord)
? value
: JSON.stringify(value);
}