
.env Diff Tool
without reorder noise.
.env files look simple until a production override hides in a long list of variables.
DiffViewr treats dotenv files as a flat global map, compares staging against production, and refuses duplicate variable names instead of accepting last-write-wins behavior.
Client-side compare. No upload. Duplicate keys blocked before review.
NODE_ENV=stagingAPI_BASE_URL=https://staging-api.diffviewr.comLOG_LEVEL=debugFEATURE_AUDIT=truePAYMENT_PROVIDER=stripe_testCACHE_TTL_SECONDS=300Every variable name is checked across the whole file because dotenv config has no nested object scope.
Duplicate variables are invalid even if another tool would keep the last value.
Staging and production values can be compared without uploading secrets to a server.
FAQ
.ENV comparison details
Are duplicate .env variable names valid?
No. DiffViewr treats duplicate variable names anywhere in the file as invalid.
Does DiffViewr understand export KEY=value lines?
Yes. Lines starting with export are accepted when they follow the KEY=VALUE shape.
How are comments handled in .env files?
Blank lines and full-line comments are ignored. Inline text after the equals sign is treated as part of the value.
Does .env support nested paths in duplicate reports?
No. Dotenv files are flat, so duplicate reports show the variable name and line details without a JSON or YAML path.