All Tools View Categories About Contact Privacy

.env vs .env.example Sync Checker

Classify every key between .env and .env.example: synced, drifting, missing, or orphaned.

Runs entirely in your browser — nothing is uploaded.

About .env vs .env.example Sync Checker

The .env vs .env.example Sync Checker gives you the full health picture of a pair of environment files in a single report. Instead of a binary pass/fail it classifies every key: synced, drifting, missing, or orphaned.

This is the tool to run before a merge: drift between your working file and the documented contract is exactly what creates “works on my machine” bugs.

A per-key status table plus a sync score turns vague unease into a checklist you can act on. The example file stays the source of truth; your real file is measured against it. All of it runs locally in your browser.

Features

  • Per-key classification: SYNCED, DRIFT, MISSING, ORPHAN.
  • Value compare: concrete example values are checked.
  • Template-aware: empty example slots never trigger drift.
  • Comment detection: #KEY= is flagged as missing.
  • Sync score: percentage of keys in perfect agreement.
  • Two-way check: drift and orphans both reported.
  • Export report: copy or download the status table.
  • 100% local: no upload, no account.

How to Use

  1. Paste .env into the first box and .env.example into the second.
  2. Click Check. Each key appears with a status and line.
  3. Fix drift directly in your .env and re-check until the score hits 100%.

Examples

Example 1 — Silent drift. A teammate changed PAYMENTS_WEBHOOK_SECRET only in .env.example. The report marks it DRIFT instead of letting the pipeline use the old secret.

Example 2 — Feature flag orphan. A refactor removed NEW_DASHBOARD from the example; the checker still lists it as ORPHAN in .env.

Example 3 — Missing on signup. Onboarding adds JWT_ISSUER to .env.example; the checker flags it MISSING in every teammate's .env until they copy it.

Example 4 — Value crossover. The example sets SERVICE_PORT=8080 while .env sets 9090; DRIFT is listed with both values so the mismatch is obvious.

Example 5 — Score gate in CI. A pipeline fails when sync score is below 100%, making drift impossible to merge.

Benefits

  • One report, all facts: no more guessing what changed.
  • Score-driven: 100% is simple to aim for.
  • Template-aware: empty slots never false-alarm.
  • Contract-first: the example stays the source of truth.
  • Private: values handled entirely in-browser.
  • Free: ready whenever you need it.

Frequently Asked Questions

What does “in sync” mean?
Two files are in sync when every key in .env.example also exists in .env with a value, and .env introduces no keys the example does not declare. Anything else is drift.
Is a different value drift?
Only when the example carries a concrete, non-empty value and your .env differs from it. Empty slot values in .env.example (like KEY=) are templates, not expectations, so they are not compared.
What statuses does the report show?
Each key in the union of both files gets one of: SYNCED, DRIFT (value differs from the example), MISSING (absent from .env) and ORPHAN (extra key in .env only).
Does this flag commented-out keys?
Yes. A required key hidden as #KEY= in .env is reported as MISSING (commented) so silent feature shutdowns are never overlooked.
Are files uploaded anywhere?
No. The comparison is pure client-side JavaScript; nothing leaves your browser.