YAML
ENV
Result will appear here
Online© 2026 YAMLFormatter.net
YAML to ENV Converter
The YAML to ENV converter transforms YAML configuration files into the widely-used dotenv format. Environment variable files (.env) are the standard way to configure applications across Docker containers, Node.js projects, Python applications, and countless other platforms. This tool flattens nested YAML structures into uppercase, underscore-separated keys.
Nested YAML keys are automatically flattened using underscores as separators. For example, database.host: localhost becomes DATABASE_HOST="localhost". Arrays are flattened with numeric indices, and all values are quoted for safety. A configurable prefix lets you namespace all keys (e.g. CDK_).
This converter runs entirely in your browser — no data is sent to any server.
- Flattens nested YAML to uppercase ENV keys
- All values quoted for safety
- Configurable key prefix
- Arrays flattened with numeric indices
- Download as .env file
- Copy result to clipboard with one click
Example Input
app: name: my-service port: 3000 database: host: localhost port: 5432
Example Output
APP_NAME="my-service" APP_PORT="3000" DATABASE_HOST="localhost" DATABASE_PORT="5432"