How to use the .env File Editor & Validator
- Paste your .env file.
- Fix any problems listed by line number.
- Convert it to the format you need — with secrets masked if you like.
What does this tool do?
dotenv files are easy to break: a duplicated key silently overrides the first, unquoted values with spaces get cut off, and comments can end up inside values. The validator flags these and the converter de-duplicates keys (the last value wins, like most loaders). .env.example output blanks anything that looks like a secret.
Your secrets never leave your browser.
Why use it?
- Finds duplicates.
- Six output formats.
- Masks secrets.
Use cases
- Debug config that works locally but not in production.
- Create a safe .env.example for a repository.
- Move settings into Docker or Kubernetes.
Problems it catches
API_URL=https://api.example.com
API_URL=http://localhost:3000 ← duplicate: this one silently wins
GREETING=hello world ← unquoted value with a space
Fix them, then convert to JSON, YAML, Docker or Kubernetes format.
Common mistakes
- Committing real .env files to git.
- Putting secrets in a .env.example.
- Forgetting quotes around values with spaces or # characters.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
Which value wins for duplicate keys?
The last one, as in most dotenv loaders.
How does masking work?
Turn it on to hide values that look like secrets in the output; the .env.example output blanks them.
Are my secrets uploaded?
No, everything stays in your browser.
Content last updated . See how M2Toolkit works.