.env Parser
Check a .env file for mistakes, compare it with .env.example, and convert it.
Runs in your browser
What your .env file really says
A .env file looks simple, but small slips cause confusing bugs: a key set twice where the second silently wins, a quote that never closes and swallows the next lines, a value with spaces that works in dotenv but breaks when a shell sources the file, a name with a dash no shell accepts. Paste the file and see every variable as your app will get it, with each problem and its line.
It follows dotenv's rules: # comments, export prefixes, single quotes taken literally, double quotes with \n and other escapes, multi-line quoted values such as private keys, and inline comments after unquoted values. Turn on Expand to resolve ${VAR} references. Compare with your .env.example to find missing keys, then export as JSON, shell exports, docker run -e flags or a Kubernetes ConfigMap or Secret.
How to use the .env Parser
Paste your .env. Or load the sample. Values of keys that look secret are hidden on screen.
Fix the problems. Each one shows its line, in file order, marked as an error, a warning or a note.
Compare with the example. Turn on Compare and paste .env.example to see missing and extra keys.
Export it. As JSON, shell exports, Docker flags, or Kubernetes YAML.
Tips
- Commit
.env.examplewith every key and no real values, and keep.envin.gitignore. - In a Kubernetes Secret,
stringDatatakes plain text; Kubernetes encodes it in Base64 for you. - Shell scripts that
source .envneedKEY=valuewith no spaces around=and quotes around values with spaces.
Frequently asked questions
Is it safe to paste my real .env?
It's parsed in your browser and never sent or saved, and this tool has no share links. Secret-looking values are hidden on screen until you choose to show them.
Which values count as secret?
Keys containing words like SECRET, TOKEN, PASSWORD, KEY, AUTH, CREDENTIAL, DSN or DATABASE_URL. They're only hidden on screen; exports include the real values.
Does it follow dotenv or the shell?
dotenv (Node's dotenv, and libraries that copy it in other languages). Where the shell would read a line differently, there's a note.
How does ${VAR} expansion work?
Like dotenv-expand: ${NAME} and $NAME are replaced by other variables in the file, ${NAME:-default} uses a default when empty, and single-quoted values are never expanded.