Skip to content
M2TOOLKIT

Developer · free tool

.env File Editor and Validator

Check and convert dotenv files safely in your browser.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Developer
  • Free
  • No sign-up
  • Runs in your browser
  • Updated

6 variables (1 duplicate) · checked in your browser, nothing is uploaded.

  • Line 8: api_url isn't UPPER_CASE (convention, not an error)
  • Line 9: API_KEY is defined again (first on line 6) — the last one usually wins
  • Line 10: DEBUG is empty

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the .env File Editor & Validator

  1. Paste your .env file.
  2. Fix any problems listed by line number.
  3. 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.

Other tools people use alongside the .env file editor & validator.