Developer Tools
Dotenv Diff Checker
Compare two .env files and see which keys are missing, added, or changed. Quote-aware parsing, secret masking, and a copy-ready patch output.
Compare
Two .env files, key by key
Summary
13 differences found.
Keys to add to B
These keys exist in A but are missing from B.
LOG_FORMAT
Keys to add to A
These keys exist in B but are missing from A.
DATABASE_TIMEOUT REFRESH_TOKEN_TTL SENTRY_DSN
Differences
- Value changedNODE_ENV
A
line 2development
B
line 2production
- Value changedPORT
A
line 33000
B
line 38080
- EqualAPP_NAME
A and B
line 4My App
- Value changedDATABASE_URL
A
line 7postgres://user:password@localhost:5432/app_dev
B
line 7postgres://app:s3cr3t@db.prod.example.com:5432/app
- Value changedDATABASE_POOL_MAX
A
line 810
B
line 850
- Value changedDATABASE_SSL
A
line 9false
B
line 9true
- Value changedJWT_SECRETmasked
A
line 12de****************me
B
line 13pr*******************12
- Value changedSESSION_TIMEOUT
A
line 133600
B
line 141800
- Value changedFEATURE_BILLING
A
line 16false
B
line 18true
- EqualFEATURE_NEW_DASHBOARD
A and B
line 17true
- Value changedLOG_LEVEL
A
line 20info
B
line 22warn
- Only in ALOG_FORMAT
A
line 21pretty
- Only in BDATABASE_TIMEOUT
B
line 1030000
- Only in BREFRESH_TOKEN_TTLmasked
B
line 1525****00
- Only in BSENTRY_DSNmasked
B
line 23ht********************************/0
How to use
- Paste your first .env file into A (for example .env.example or .env.staging) and the file you want to compare against into B (for example .env.production).
- Read the summary tiles for at-a-glance counts of Only in A, Only in B, Changed, and Equal keys.
- Use the two missing-keys panels to copy the list of variables you need to add to each side directly into your config.
- Filter the differences list by status to zoom in on changed values, missing keys, or matches.
- Toggle Case-insensitive keys, Trim values, Treat empty as missing, and Mask likely secrets to match your team's convention and protect credentials in screenshots.
- Click Copy patch to grab a plain-text diff ready for a Slack thread, ticket, or pull-request comment. Use Swap sides to flip A and B, or Clear both to start over.
About this tool
Dotenv Diff Checker compares two .env files and reports exactly which environment variables are missing, added, or have changed values, so you can spot drift between .env.example and .env.production, between staging and production, or between a teammate's local file and the committed example. Paste your two files into A and B and the result updates as you type. The parser implements the practical subset of dotenv syntax that real libraries accept, including KEY=value lines with optional `export ` prefix, double-quoted values with \n \r \t \\ \" escapes that may span multiple lines, single-quoted literal strings, blank lines and `#` comments, end-of-line comments after unquoted values, and duplicate keys where the last value wins. Each key is classified as Only in A (missing from B, often a removed variable), Only in B (new variable added since last sync), Value changed (same key, different resolved value), or Equal (same value on both sides). The summary shows totals at a glance, and dedicated panels list the keys you need to add to each side so you can paste them straight into the missing file. A side-by-side value view shows both resolved values with source line numbers, lets you copy the key, and warns about duplicate keys in either file. Options tune the comparison for your team's convention: case-insensitive keys folds DATABASE_URL and database_url together, trim values strips surrounding whitespace before comparing, treat empty as missing counts KEY= the same as a missing key, and mask likely secrets hides values for keys like SECRET, TOKEN, KEY, PASSWORD, PRIVATE, DSN, and JWT so you can share screenshots without leaking credentials. A Copy patch button emits a diff-style text block (`+ KEY=value`, `- KEY=value`, `~ KEY:` with before / after) ready for a Slack thread, ticket, or pull-request comment. Useful for site reliability engineers reconciling .env.example with the real .env.production, developers onboarding a new repo and wondering which variables they are missing, CI/CD owners verifying that secrets in staging match production before a deploy, and security reviewers diffing the variables provisioned to a serverless function against the documented baseline. Everything parses in your browser using local string operations, so the secrets in your .env files stay on your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Env to JSON Converter
Two-way dotenv and JSON converter with multi-line value, secret masking, and nested key support.
Open tool
DeveloperJSON Diff Checker
Structural compare with paths for added, removed, and changed values.
Open tool
DeveloperYAML Diff Checker
Structural compare for YAML with paths for added, removed, and changed values.
Open tool
TextText Diff
Side-by-side line, word, and character diff with a unified patch.
Open tool
DeveloperGitignore Generator
Build a .gitignore from curated language, framework, editor, and OS templates.
Open tool
DeveloperDockerfile Generator
Build a production Dockerfile with multi-stage build, non-root user, BuildKit cache, and healthcheck.
Open tool