01What is Env File Validator?
You pull the latest main, start the app, and it crashes because someone added a new variable to .env.example last week. Env File Validator catches that before you hit run. Paste the example file in one box and your real .env in the other, and you get every variable with a status next to it. There are five statuses. Missing means the key is in the example but not in your .env. Extra means it is in your .env but nobody documented it. Empty means the key exists with nothing after the equals sign. Type Mismatch means the example value hints at a type that your real value does not have. OK covers everything else. The list is sorted with Missing first, then Type Mismatch, Empty, Extra and OK, so problems sit at the top. The summary tiles show counts, and clicking a tile filters the list to that status. Types come only from the example file, and the rules are simple. Exactly true or false means boolean. Digits only, with an optional leading minus, means integer. Digits with one decimal point means number. A value starting with http:// or https:// means URL. Anything else gets no type check at all. The parser follows the usual dotenv conventions. It skips blank lines and lines starting with #. It accepts an export prefix, because many teams source the same file from a shell. Matching single, double or backtick quotes are stripped. A space followed by # after an unquoted value starts an inline comment, so PORT=3000 # web port reads as 3000. Inside quotes the # is kept. A worked example: the example file says ENABLE_CACHE=true and your .env says ENABLE_CACHE=True. You get Type Mismatch with the hint Expected boolean (true/false), got "True", because the check is case-sensitive. Some honest limits. A leading minus is fine, so -1 passes as an integer. A postgresql:// or redis:// example value carries no URL rule, so a broken database URL can still show OK. A quoted value can run over several lines, such as a PEM key, and is read up to its closing quote. The tool also cannot tell you whether a value is correct, only that it is present and plausibly typed. Comparison runs as you type, in your browser, so the secrets you paste never leave your machine.
Developers who keep a .env.example in the repo and want to check a local or server .env against it before the app fails at startup. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Env File Validator
- Paste your .env.example into the .env.example (Schema) box.
- Paste the real file into the .env (Values) box. The results update as you type.
- Read the summary tiles: Total, OK, Missing, Empty, Type Err and Extra.
- Click a tile to filter the list, for example Missing or Type Err.
- Fix your .env until every row shows OK, then use Copy Report if you want a plain-text summary.
03Worked examples
- Input:
.env.example: PORT=3000, DEBUG=false .env: PORT=3000 # web, DEBUG=0 - Result:
DEBUG: Type Mismatch (Expected boolean (true/false), got "0") PORT: OK - The # web part is read as a comment, so PORT is 3000. Only true or false count as boolean, so 0 is flagged.
- Input:
.env.example: ENABLE_CACHE=true .env: ENABLE_CACHE=True - Result:
ENABLE_CACHE: Type Mismatch (Expected boolean (true/false), got "True") - The boolean check is case-sensitive.
- Input:
.env.example: RATE=1.5, WORKERS=4 .env: RATE=2, WORKERS=-1.5 - Result:
WORKERS: Type Mismatch (Expected integer, got "-1.5") RATE: OK - A whole number passes where the example is a decimal, but a decimal fails where the example is an integer. A leading minus is allowed.
- Input:
.env.example: DATABASE_URL=postgresql://u:p@localhost/db, API_URL=https://api.example.com .env: DATABASE_URL=mysql://x, API_URL=api.example.com - Result:
API_URL: Type Mismatch (Expected URL, got "api.example.com") DATABASE_URL: OK - Only http:// and https:// example values set a URL rule, so DATABASE_URL is not checked.
- Input:
.env.example: SECRET=changeme, REDIS_URL=redis://localhost .env: export SECRET="abc#123", REDIS_URL= , SENTRY_DSN=https://x - Result:
REDIS_URL: Empty SENTRY_DSN: Extra SECRET: OK Total 3, OK 1, Empty 1, Extra 1 - The export prefix is dropped, and the quoted value keeps its # because it sits inside quotes.
- Input:
.env.example: API_KEY=, PORT=3000, NODE_ENV=production .env: PORT=3000 - Result:
API_KEY: Missing NODE_ENV: Missing PORT: OK - Each Missing row carries the hint Required variable is missing from .env.
04Common use cases
- Checking your local .env after a pull that added new keys to .env.example
- Walking a new teammate through setup by pasting their .env and fixing every red Missing row together
- Auditing a staging server's .env for Extra keys that nobody documented and might be stale
- Catching yes, on, 1 or True in a flag that the example defines as plain true or false
- Spotting a timeout written as 30s where the example expects a bare integer
- Reviewing a pull request that changes .env.example, to see which existing environments will now be missing a key
05Tips
- Give every example value a realistic placeholder. An empty value or a word like changeme switches off the type check for that key.
- If a value really contains #, wrap it in quotes. Unquoted, anything after a space and # is treated as a comment.
- Use https:// placeholders for HTTP endpoints in the example file. That is the only way the tool knows to check a URL.
- Use 0 or a positive count in examples. The integer rule rejects a minus sign, so -1 as a sentinel always shows as Type Mismatch.
06Related concepts
dotenv, 12-factor app, Environment configuration, Secrets management.
Frequently Asked Questions
What is Env File Validator?
Env File Validator is a free, browser-based developer tool on AIDToolStack. Compare .env and .env.example files to find missing, extra, or empty variables. It requires no installation or sign-up and works entirely in your browser.
Is Env File Validator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Env File Validator store my data?
No. It runs in your browser; nothing is uploaded.