.env File Validator
Check an ENV file for malformed assignments, duplicate keys, empty values, missing references, and risky whitespace.
Practical guide
How to validate an .env file
The ENV validator checks portable dotenv syntax and common configuration mistakes before the file reaches an application or CI pipeline.
- 1Paste or load the ENV file you want to validate.
- 2Fix syntax errors first, because malformed assignments cannot be interpreted safely.
- 3Review warnings for duplicate keys, empty values, unresolved references, and whitespace that runtimes may handle differently.
What this tool handles
- Invalid or non-portable variable names
- Lines without a valid key-value assignment
- Duplicate keys and empty values
- References such as ${HOST} when HOST is not defined in the same file
- Leading or trailing whitespace that can change a value
Example
API URL=https://example.com
PORT=3000
PORT=4000
TOKEN=
API_URL=${HOST}/v1
Result: invalid key, duplicate PORT, empty TOKEN, and missing HOSTFrequently asked questions
What does the ENV validator consider an error?
An error is a line EnvSift cannot safely parse as a portable key-value assignment. Warnings are valid assignments that may still cause unexpected behavior.
Does validation prove that credentials work?
No. EnvSift validates file structure and references. It cannot connect to databases, APIs, or deployment platforms to verify a credential.
Can I validate an .env.example file?
Yes. Empty values are expected in many templates, so review those warnings in context and focus on malformed or duplicate keys.