Home Tools Diff .env How It Works 1
Paste both files The required file goes left, your candidate .env goes right. A sample is preloaded.
2
Read the three buckets Missing, extra and matched keys with live counts in a single table.
3
Copy the fix Every row has a copy button for a ready-to-paste KEY=value line.
Why comparing .env files matters Environment drift is a silent killer of deploys.
A teammate adds STRIPE_SECRET_KEY to .env.example Your .env never gets it, and the payment code ships Payments fail at runtime, not at build time A missing-key diff catches this before CI does. It is the difference between a clean deploy and a hotfix at midnight.
How to keep .env.example and .env in sync Treat .env.example as the contract for every key your app reads. Compare your real .env against it in CI with envy diff. Pair it with the syntax validator so files are complete and valid before they ship. Frequently Asked Questions Common questions about comparing .env files
What does missing mean in an .env diff? A key that exists in your required file (.env.example) but not in the candidate (.env). At runtime, code reading it gets undefined, which is how environment drift breaks production.
How do I compare two .env files locally? Why does my .env have extra keys? Can I copy the missing keys directly? Is this the same as `envy diff`? What does a missing key actually break? Does the diff tool upload my files?