Productivity and Utilities

Env File Comparer

Paste two .env files to see which keys are missing from each and which values differ, without showing the values unless you choose to.

Your numbers

Lines like KEY=value. Comments, export prefixes and quotes are understood.

Result

Differences found

5

Keys missing from one side plus keys whose values differ.

Keys in A
5
Keys in B
4
Same key and value
1
Different value
2
Only in A
2
Only in B
1
Keys in either file
6

Keys with different values

KeyIn AIn B
DATABASE_URL(29 characters)(31 characters)
DEBUG(5 characters)(4 characters)

Only in A

KeyLine in A
PORT5
SENTRY_DSN6

Only in B

KeyLine in B
CACHE_TTL5
How this was calculated
  1. Each file is read line by line. Blank lines and lines starting with # are skipped, and a leading "export " is removed.
  2. Quoted values keep what is inside the quotes. For unquoted values, a space followed by # starts a comment.
  3. The key lists are compared. Keys in both files are then checked for the same value. Values are hidden unless you tick the box, and only the length is shown.
  • Everything is compared in your browser and nothing is sent anywhere. Even so, avoid pasting real production secrets into any web page. A copy with the secrets replaced is enough to compare keys.

Calculated using SumPanda.com · https://sumpanda.com/env-file-comparer/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the env file comparer

  1. Paste the first env file into box A and the second into box B. Lines look like KEY=value.
  2. Leave Show values for keys that differ unticked to keep secrets hidden. Only the length of each value is shown.
  3. Read the count of differences, then the tables of keys with different values, keys only in A and keys only in B.
  4. Download the CSV for a list of every key and its status.

Formula

parse each file into a map of keys to values

only in A = keys of A that are not in B; only in B = keys of B that are not in A

different = keys in both whose values are not equal

same = keys in both with equal values

Blank lines and lines that start with # are skipped, and a leading export is removed. Double or single quotes around a value are removed. For an unquoted value, a space followed by # starts a comment. If a key appears twice, the last value is used.

A live file against a test file

File A has DATABASE_URL, API_KEY, DEBUG, PORT and an empty SENTRY_DSN. File B has DATABASE_URL, API_KEY, DEBUG and CACHE_TTL. The page finds 5 differences: PORT and SENTRY_DSN exist only in A, CACHE_TTL exists only in B, and DATABASE_URL and DEBUG have different values.

API_KEY is the same in both. With values hidden, the table shows only lengths, such as 5 characters in one file against 9 in the other. A blank value shows as empty, which helps spot a key that exists but has not been filled in.

Keeping secrets out of sight

A comparison usually needs only the key names. By default the page hides the values, so you can share a screen or a screenshot without exposing them. Everything is computed in your browser and nothing is stored or uploaded. Even so, avoid pasting real production secrets into any web page, and compare copies with the secrets replaced when you can.

What it understands

The parser follows the common dotenv style. It does not expand variables such as ${OTHER}, run commands or handle multi-line values, so check those by eye. Lines that are not KEY=value are reported and skipped. For related tasks, see the Env File to JSON Converter, the Compare Two Lists tool and the Diff Checker.

Assumptions and limits

  • Keys may contain letters, digits, underscores, dots and hyphens, and must not start with a digit.
  • Values are compared exactly after quotes are removed. Whitespace around an unquoted value is trimmed.
  • Each file is limited to 200,000 characters.
  • Variable expansion and multi-line values are not handled.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Does the page store or send my files?

No. Both boxes are compared in your browser, are not part of share links and are not saved. The values are hidden by default as an extra precaution.

What does a repeated key do?

The last value wins, like most dotenv loaders, and the page tells you which keys appeared more than once so you can fix the file.

Why did a line get skipped?

A line is skipped if it has no equals sign or if the key has characters other than letters, digits, underscore, dot and hyphen. The line numbers are listed.

Can I compare more than two files?

Not at once. Compare them in pairs, for example the live file against the test file and then the test file against your own copy.