Converters

Env Variable Converter

Convert .env files to Dockerfile, docker-compose, GitHub Actions, Vercel, Kubernetes ConfigMap, and more.

8 output formats Secret masking YAML input K8s support

How the Env Variable Converter Works

The ByteKiln Env Converter parses your .env or YAML input in-browser and reformats it into the target platform's syntax using pure JavaScript — no server, no uploads.

Auto-detection

The parser first checks for YAML indicators and tries js-yaml. If that fails or the input uses KEY=VALUE syntax, it falls back to the .env parser which handles quoted values and comment lines.

Secret detection

A regex pattern scans each key name for common secret indicators. Detected secrets are masked in most output formats, placed in the K8s Secret resource, and highlighted with a comment in the GitHub Actions format.

Output formats

Eight output formats cover the most common deployment platforms: .env, Dockerfile ENV, docker-compose environment block, GitHub Actions env/secrets, Vercel environment JSON, plain JSON, Kubernetes ConfigMap, and Kubernetes Secret.

FAQ

Short answers for the things developers usually ask before trusting a tool.

What input formats are supported?

The tool accepts standard .env format (KEY=VALUE, with optional quotes) and YAML key-value pairs. It auto-detects which format you pasted based on whether the input contains = signs or YAML-style colons.

How does secret masking work?

Keys matching patterns like SECRET, KEY, PASSWORD, TOKEN, PRIVATE, API_KEY, AUTH, CREDENTIAL, CERT, SALT, or HMAC are detected as secrets. When masking is enabled, their values are partially obscured (first 2 + last 2 characters shown with asterisks).

What is the difference between K8s ConfigMap and K8s Secret?

A Kubernetes ConfigMap stores non-sensitive configuration. A Secret is intended for sensitive values and stores data base64-encoded. The converter puts detected secrets in the Secret output and non-secrets in the ConfigMap output.

Does my .env file get uploaded anywhere?

No. All conversion happens in your browser using JavaScript. Your environment variables never leave your machine.

Can I paste a .env file with comments?

Yes. Lines starting with # are treated as comments and ignored.

Related tools

Useful follow-ups when one conversion usually turns into three more.