PureDevTools

YAML to .env Converter

Paste YAML, get .env — nested keys flattened to UPPER_SNAKE_CASE — copy or download as .env

All processing happens in your browser. No data is sent to any server.
Converts flat and nested YAML configs to .env format. Nested keys are flattened with underscores (e.g. database.host becomes DATABASE_HOST).
Input (YAML)
Output (.env)

You have environment-specific configuration in YAML and need to convert it to .env format for Docker, Docker Compose, or a 12-factor app. Manually flattening nested YAML keys into UPPER_SNAKE_CASE environment variables is tedious.

What This Tool Does

Paste YAML and get .env output instantly. The converter flattens nested YAML keys using underscore separators, converts keys to UPPER_SNAKE_CASE, and properly quotes values that contain spaces or special characters. Download the result as a .env file.

Everything runs in your browser. Your data never leaves your device.

When to Use This

How Nesting Works

Nested YAML keys are flattened with underscores:

database:
  host: localhost
  port: 5432

Becomes:

DATABASE_HOST=localhost
DATABASE_PORT=5432

FAQ

Does this send my data to a server?

No. All processing happens entirely in your browser. Sensitive config values stay on your device.

How are arrays handled?

Arrays are converted to comma-separated values by default. For example, hosts: [a, b, c] becomes HOSTS=a,b,c.

Related Tools

More Data Converter Tools