ENV File Validator
Validate a .env file against .env.example and catch missing variables, empty values and type mismatches.
ENV File Validator
8 variables detected
9 variables detected
1 issue found
Issues (1)
SENTRY_DSNMissing variable: SENTRY_DSN is in .env.example but not in .env
Variable overview
| Variable | .env | .env.example | Inferred type | Status |
|---|---|---|---|---|
| NODE_ENV | set | defined | string | OK |
| PORT | set | defined | port | OK |
| DATABASE_URL | set | defined | string | OK |
| API_KEY | set | defined | string | OK |
| REDIS_URL | set | defined | string | OK |
| ENABLE_CACHE | set | defined | boolean | OK |
| LOG_LEVEL | set | defined | string | OK |
| SECRET | set | defined | string | OK |
| SENTRY_DSN | missing | defined | - | Missing |
Updated . Provided as is. Check the output before you rely on it in production.
How to use ENV File Validator
- 1
Paste .env and .env.example in two panels
Left: paste your .env (current config). Right: paste .env.example (template). Validator auto-detects variables and compares them immediately.
- 2
Review validation results
See summary cards: Valid, Missing, Extra, Empty, Type Issues. Each shows count and color (green=ok, red=error). Detailed list below shows exact problem variables.
- 3
Check for missing or extra variables
Red 'MISSING' label: key exists in template but not in your .env (will cause undefined errors). Orange 'EXTRA' label: key in your .env but not in template (undocumented).
- 4
Enable type checking for validation
Check 'Type checking' checkbox to detect mismatches (e.g., PORT should be number, not string). View inferred types in Variable Overview table.
- 5
Copy validation report or fix manually
Click 'Copy Report' to share results with team. Fix issues: add missing vars, remove extra vars, fill empty values. Revalidate until all clear.
Questions and answers
What is the ENV File Validator?
Is this tool free?
Does this tool store or send my data?
How to prevent missing env vars in production?
Use it as an API
ENV File Validator is also callable as a free HTTP JSON API at
https://aidevhub.io/api/env-file-validator/ — GET with query
parameters or POST with a JSON body, no authentication, CORS enabled, fair use
(abusive traffic is throttled at the edge; there is no per-request quota header). Responses return
{ ok, tool, result, meta }.
curl -s -X POST https://aidevhub.io/api/env-file-validator/ \
-H "Content-Type: application/json" \
-d '{"content":"API_KEY=abc123\nDEBUG=true\nPORT=3000"}' Machine-readable contract: /api/tool/env-file-validator.json All API endpoints: /agents/ LLM site index: /llms.txt
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Dedicated API endpoint
Deterministic outputs, machine-safe contracts, and production-ready examples.
Dedicated API
https://aidevhub.io/api/env-file-validator/ OpenAPI: https://aidevhub.io/api/openapi.yaml