.env File Diff
Compare two .env files key by key and see which variables are missing, empty or different, with secret values masked by default.
Free · No sign-up · Your inputs stay in your browser
Input
Compare two .env files
Output
9 keys, 4 missing or empty
| Key | A | B | Status |
|---|---|---|---|
| APP_DEBUG | true | false | different |
| APP_ENV | local | production | different |
| APP_URL | http://localhost | https://example.com | different |
| DB_HOST | mysql | 10.0.0.5 | different |
| DB_PASSWORD | ••• | (empty) | empty in B |
| MAIL_MAILER | smtp | - | only in A |
| QUEUE_CONNECTION | sync | redis | different |
| REDIS_HOST | - | 10.0.0.6 | only in B |
| SENTRY_DSN | - | ••• | only in B |
The usual failure is a key added to .env.example and to local but never to production, which surfaces as a null config value at runtime. Comments and export prefixes are ignored; quoted values are compared without their quotes.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
The bug it catches
A variable is added to .env.example and to a developer's .env, the feature ships, and production has no such key: the config value is null and the failure shows up far from its cause. Comparing .env.example with the environment a server actually has, before deploying, catches it. Laravel's php artisan env and config:show help confirm what was loaded.
Paste with care
Production .env files contain credentials. This comparison runs in the browser and nothing is sent, but the safest habit is to paste with values redacted, since only the keys are needed to find what is missing.