Validate .env File Online — KEY=VALUE Parser

Validate .env syntax, quoted values and duplicate keys. Advisory secret hints — not a secrets scanner.

Loading…
.env validator — parse and hygiene checks
Validate local environment files before you commit. It catches malformed lines and duplicate keys without sending secrets to a server.

Developer notes

Not a dotenv or vault replacement. Secret-pattern warnings are hints only (password, token or api_key in a key name). Spaces in unquoted values trigger warnings. Never commit real production secrets. Use .env.example in repos. Issues and severity counts appear in the results panel, not under the editor.

When teams pick this route

Lint a .env.example template before sharing. Find duplicate DATABASE_URL entries after merges. Catch unclosed quotes from manual edits. Quick review of export-prefixed shell env files.

Worked examples

Typical local dev file

.env input

# API export NODE_ENV=development PORT=3000 LOG_LEVEL=debug API_BASE_URL=http://localhost:3000 DATABASE_URL=postgres://user:pass@localhost:5432/app REDIS_URL=redis://localhost:6379 DEBUG=true

Validation result

Valid: well-formed keys. DATABASE_URL may show an advisory secret hint. The result appears in the results panel.

Duplicate key and bad line

.env input

REDIS_URL=redis://localhost:6379 REDIS_URL=redis://cache:6379 API_KEY=abc123 THIS IS NOT VALID JWT_SECRET=super-secret

Validation result

Warning on duplicate REDIS_URL, error on a line without =, hints on the API_KEY and JWT_SECRET keys. The result appears in the results panel.

Navigate related DevOps tools

Infrastructure repos often pair .env with Compose. Try validate Docker Compose and the DevOps hub.

.env validator FAQ

Parse and hygiene

Secrets scanner?

No, it only gives lightweight hints when key names look sensitive. Use dedicated secret scanning in CI.

Supports export prefix?

Yes, lines like export KEY=value are parsed.

Quoted values?

Single and double quotes supported; unclosed quotes report an error with line number.

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.