About this tool
Compare two .env files side by side to find missing, extra and changed variables using dotenv parsing rules.
This tool compares two .env files and lists every variable that is missing, extra or changed between them. It parses both files with standard dotenv rules — comments, export prefixes, quoting and escape sequences — so it reports real configuration drift rather than cosmetic formatting differences. It is built for developers reconciling staging against production, or a teammate's .env against .env.example.
Open Env File Diff Tool on AltFTool — it loads instantly in your browser.
Upload or drag in the file you want to work with.
Adjust the settings and preview the result.
Download the finished file to your device.
FOO=bar and FOO="bar" compare as equal because values are diffed after dotenv parsing, not as raw text.
Every key lands in exactly one bucket: only in A, only in B, or changed — with identical keys counted separately.
Keys defined twice in one file are flagged, with dotenv's last-assignment-wins rule applied.
Paste one file into each panel and the diff appears instantly: variables only in file A, only in file B, and keys whose values changed. Line order does not matter — comparison is by variable name, the way your runtime actually reads the file.
No. Values are compared after dotenv parsing, so PORT=3000, PORT='3000' and PORT="3000" are all the same value. Inside double quotes, escape sequences like \n are expanded first, matching what dotenv-style loaders hand to your application.
The last assignment wins, which is how dotenv's parser behaves when scanning down a file. The tool uses that final value for the comparison and separately warns you which keys were duplicated so you can clean them up.
The comparison runs entirely in your browser; nothing you paste is transmitted or stored. Still, treat any .env containing production credentials carefully — clear the page when done and avoid pasting secrets on shared machines.