.env ↔ docker-compose ↔ Kubernetes converter

Paste your environment variables in one format and get the others instantly — a .env file, a docker-compose environment: block, and a Kubernetes ConfigMap or Secret. It handles the traps: .env quoting, compose list-vs-map form, and — the big one — a Secret’s data: must be base64 while stringData: is plain text.

Detected: .env
  • Comment lines (#) were dropped — they have no equivalent in the other formats.

Parsed 4 variables.

.env
DATABASE_URL=postgres://user:p@ss@db:5432/app
LOG_LEVEL=debug
FEATURE_FLAGS=beta,search
API_TOKEN="a secret value"

Why this exists

Moving the same set of variables between local development (.env), Docker Compose, and Kubernetes is repetitive and error-prone. The classic mistake: pasting a plain value into a Secret’s data: field, which Kubernetes expects to be base64-encoded — so the value arrives garbled. This converter encodes it for you and also offers the stringData: form (plain text, encoded on apply) so you can pick.

Everything runs in your browser. Your variables — which may include secrets — are never sent to a server. A Kubernetes Secret is only base64, not encrypted at rest by default; enable encryption or a secrets manager for anything sensitive.