Group dotted KEY_NAME pairs back into a YAML tree. Part of the DevTools Surf developer suite. Browse more tools in the Converters collection.
Use Cases
Restructuring flat environment variables into a YAML config file
Creating Docker Compose configs from existing .env files
Generating Kubernetes ConfigMap YAML from deployment secrets
Converting legacy shell exports into structured application config
Tips
Dotted key names like DB_HOST are grouped into nested YAML
Check the YAML output for correct indentation and nesting
Use this to reverse-engineer flat configs into structured format
Fun Facts
YAML supports 63 scalar types out of the box in the 1.1 specification, including timestamps, binary, and null — far more than most developers realize.
The most common YAML gotcha is that 'NO' and 'yes' are parsed as booleans, not strings, in YAML 1.1 — a source of countless bugs in CI configs.
YAML was designed to be a human-friendly data serialization format and is a strict superset of JSON, meaning every valid JSON file is also valid YAML.
FAQ
How does it handle dotted keys like DB_POOL_SIZE?
Optional: toggle 'expand dots' to create nested YAML (db.pool.size → a 3-level tree). Default keeps the flat KEY_NAME form.
Does it infer types?
Yes — `true`/`false` become booleans, digits become numbers. Toggle off to preserve everything as strings, useful when the consumer expects string semantics.
What about multi-line values?
YAML's `|` block literal. Values with newlines become block-style; single-line values stay inline as strings.
Can I go back from YAML to .env?
Yes — pair with yaml-to-env. Flattens the nested tree back to dot-delimited keys. Round-trip is lossless for simple values.