Env YAML Converter
BetaConvert a .env file to a flat YAML map, or to a pasteable Docker Compose or GitHub Actions env block, and back. Runs in your browser; secrets are not uploaded.
- Free, no sign-up
- REST + MCP
- Updated
- Reviewed by Olgun Ozoktas
The .env text is converted in your browser and is not uploaded to FindUtils. Analytics and ads may load on the page. Prefer your platform's secret storage over committing real production values into YAML.
The YAML will appear here..
How to convert a .env file to YAML
-
Paste or upload the .env
Paste the file into the left panel or upload it. Comments, blank lines and a leading export are handled, and the samples are a Node, a Laravel and a CI style file. -
Pick the shape
Plain map is a flat mapping of names to values. Compose wraps it under services.app.environment and Actions under jobs.app.env, each a snippet to paste into a real file rather than a complete one. -
Decide on types
Values stay strings by default, which is what process.env hands back. Turn on Numbers and booleans if the consumer expects real YAML types, and remember that a quoted value in the .env is never retyped. -
Copy or download
Copy the YAML or download env.yaml. Switch the direction to flatten a YAML map back into KEY=value lines; a Compose or Actions snippet is recognised and unwrapped.
Common Use Cases
Filling a Compose environment block
Seeding a workflow env map
Reading a values map back as .env
Auditing a file for duplicates
Why convert a .env into YAML in the browser?
A dotenv file and a YAML environment block hold the same thing and write it differently. FindUtils' Env YAML Converter moves between them in the browser, reusing the same dotenv parser as the Env JSON Converter: comments, blank lines, a leading export, single and double quoting, escapes, and duplicate keys where the last one wins and every occurrence is reported.
The output shape is the useful part. Plain map is a flat mapping. Compose wraps the keys under services.app.environment and Actions under jobs.app.env — each labelled as a snippet to paste into a real file, because generating a whole compose file or workflow from a list of variables would be guessing at everything else in it. Values stay strings by default, matching what a process actually receives, with an option to promote numbers and booleans when the consumer wants real types.
The reverse direction takes a flat mapping, or one of those snippet shapes, and writes KEY=value lines with quoting applied only where a value needs it. A nested value is refused with a message instead of being flattened into a name you never chose. This is not a Kubernetes Secret generator, it does not expand shell variables, and it will not tell you it is safe to commit a production key — prefer your platform's secret storage for that. For linting an existing file, the Env Linter is the neighbour.
How it compares
The chain most people use is Env to JSON, then JSON to YAML, on two pages, with the secrets pasted twice. Doing it in one step halves that and keeps the dotenv rules intact, including the quoting that decides whether a value is retyped. Compared with a shell one-liner, the page handles quoted values and duplicates rather than splitting on the first equals sign.
It is deliberately narrower than the tools that generate whole manifests. It will not write a Kubernetes Secret, a Helm values tree or a complete compose file, because each of those needs decisions about fields this page knows nothing about. It shapes the variables and says so.
Env and YAML Tips
- Keep real secrets out of committed YAML. Use the platform's secret storage and reference it; this page is for shaping the file, not for publishing credentials.
- The Compose and Actions shapes are snippets, not whole files. Paste the block into the real compose file or workflow rather than saving it as one.
- Leave Numbers and booleans off when the consumer reads environment variables, because every environment variable is a string to the process that receives it.
- A value with a space, a hash or a quote is written back to .env in double quotes, so it survives a re-read. A plain value is left unquoted.
- Going back from YAML accepts a flat mapping of scalars. A nested value is refused rather than flattened into an invented name such as DB__HOST.