Loading tool…
About the .env File Validator
Paste the contents of a .env file to catch common mistakes: lines that aren’t valid KEY=VALUE pairs, duplicate keys (the last one silently wins in most loaders), and keys that don’t follow the conventional UPPER_SNAKE_CASE naming.
How to use the .env File Validator
- Paste your .env file contents.
- Click Validate.
- Issues are listed by line number, grouped into ERROR, WARNING, and INFO.
- Fix and re-check as needed — nothing is sent to a server.
Step-by-step walkthrough with examples and the errors people hit: .env File Syntax Rules and Common Mistakes.
Example
Common warning
DATABASE_URL=postgres://localhost/app DATABASE_URL=postgres://prod/app→
WARNING: DATABASE_URL is defined twice — most loaders will silently use the last value
Common errors and how to fix them
A value with a # got cut off
Unquoted # starts a comment in most loaders. Wrap the value in double quotes.
Variables are not expanding
Expansion of ${OTHER} depends on the loader and on quoting; single quotes usually disable it. Check your library's documentation.
More problems and fixes in the tutorial
FAQ
Does this check whether values are correct?
No — it checks syntax and structure (valid key names, no duplicates, balanced quotes), not whether a URL, port, or credential is actually valid for your application.
Is my .env file uploaded anywhere?
No — checks run entirely in your browser. A .env file can contain real secrets, so be as careful pasting one into any web tool as you would be pasting it into chat. If you must show one to a colleague, use a private room with a PIN and let it expire.