.env to YAML Converter
.env → YAML. Handles export prefixes, inline comments, and the dotenv quoting rules (double quotes expand \n, single quotes stay literal).
.env to YAML Converter — Free Online Tool
Converts a .env file into YAML, parsing KEY=value pairs with quoted values, escaped newlines, export prefixes and comments, and optionally expanding double-underscore keys (DB__HOST) into nested YAML mappings, useful for moving twelve-factor environment configuration into Kubernetes ConfigMaps, docker-compose environment blocks and Helm values files.
How to use the .env to YAML Converter
- Open the tool above — it runs entirely in your browser, so your input never leaves this page.
- Paste or type your input into the field, then press the relevant button (e.g. Encode / Decode, Generate, or Convert).
- Copy the result from the output area with the copy button orCtrl/Cmd + C.
- No signup, no upload, and no tracking — repeat as often as you need.
Frequently asked questions
How are quoted values treated?
Following dotenv rules: a double-quoted value expands \n and \t escapes, a single-quoted value is taken literally, and an unquoted value is trimmed with any trailing inline comment removed.
What does the nesting separator do?
Environment variables are flat, so frameworks encode hierarchy in the name — DB__HOST in .NET and Spring, DATABASE__POOL__MAX in many Node apps. Expanding on that separator rebuilds the nested YAML mapping the config file actually wants.
Can I paste this straight into a Kubernetes ConfigMap?
Indent it under the data: key and yes. Note that ConfigMap data values must be strings, so turn scalar inference off if the target requires quoted values.
Free & private — why use this .env to YAML Converter
The .env to YAML Converter runs 100% client-side in your browser. Your data is never uploaded to a server, no account is required, and the tool is completely free. It works offline once the page has loaded and is part of a growing collection of privacy-first developer utilities.