.env File Parser and Converter
Parse a .env file, flag duplicate keys and unquoted spaces, and convert it to Docker Compose, docker run flags, a Kubernetes ConfigMap or Secret, or JSON.
Free · No sign-up · Your inputs stay in your browser
Input
Parse and convert a .env file
Output
Converted
7 variables
Line 7: MAIL_FROM_NAME has an unquoted space. Docker Compose reads it, but sourcing the file in a shell will not; quote it.
Line 8: APP_ENV is also set on line 2. Most loaders keep the last one; Laravel (phpdotenv) keeps the first.
Duplicate keys keep the last value here, as Docker Compose does. A Kubernetes Secret is only base64-encoded, not encrypted; anyone who can read it in the cluster can decode it.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
There is no .env standard
Each loader has its own rules. phpdotenv, which Laravel uses, does not overwrite a variable that already exists, so the first definition in the file wins over a later one; Docker Compose and Node's dotenv keep the last. Compose treats quotes and inline comments differently from a shell that sources the file. Quote every value containing spaces or a # and the differences mostly disappear.
Secrets in Kubernetes
A Kubernetes Secret's data is base64-encoded, not encrypted. Anyone allowed to read Secrets in the namespace can decode them, so restrict that with RBAC and enable encryption at rest for etcd.