Skip to content

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

Valid
8
Missing
1
Extra
0
Empty
0
Type issues
0

Issues (1)

MissingSENTRY_DSN

Missing variable: SENTRY_DSN is in .env.example but not in .env

Variable overview

Variable.env.env.exampleInferred typeStatus
NODE_ENVsetdefinedstringOK
PORTsetdefinedportOK
DATABASE_URLsetdefinedstringOK
API_KEYsetdefinedstringOK
REDIS_URLsetdefinedstringOK
ENABLE_CACHEsetdefinedbooleanOK
LOG_LEVELsetdefinedstringOK
SECRETsetdefinedstringOK
SENTRY_DSNmissingdefined-Missing
Need to create a .env from scratch?Generate one →

Updated . Provided as is. Check the output before you rely on it in production.

How to use ENV File Validator

  1. 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. 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. 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. 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. 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?
An .env.example file lists the environment variables an app expects, with placeholder values, and is committed in place of the real .env. This validator compares your .env against it and reports missing variables, undocumented extras, empty values and values whose inferred type (number, URL, email, port) differs.
Is this tool free?
Yes, Free to use with no signup. All validation happens in your browser — your environment variables never leave your device.
Does this tool store or send my data?
No. All processing happens entirely in your browser. Your .env contents are not sent to external servers. This is critical since .env files often contain secrets and API keys.
How to prevent missing env vars in production?
Commit a .env.example that lists every variable, and add a startup or CI check that compares it with the real environment before deploying. Locally, paste both files here to catch missing variables, and turn on type checking to catch values like a string where a URL is expected.

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

GET /api/env-file-validator/ GET env-file-validator
POST /api/env-file-validator/ POST env-file-validator