.env Comparison

Compare local .env configurations by key. Find missing and changed values, inspect duplicate key lines, and export a masked report without uploading secrets.

Local processing; up to 200,000 characters per side. Single-line values only. No upload or automatic saving. Input boxes show the text you paste.

What is .env Comparison

Compare configuration entries by key rather than line position. The tool reports additions, removals, changed values and duplicate definitions. It does not execute configuration or contact any service. All output values are masked until you explicitly reveal them; the pasted input remains visible in its editor.

How to use .env Comparison

  1. Paste configuration A and B. Remove secrets you do not need to compare before pasting.
  2. Compare and review duplicate key locations. The last assignment for each key is used; unchanged keys are hidden by default.
  3. Review the table and copy or download the displayed report. Reveal values only if you also want them included in the export; use Clear inputs when finished.

Features and limits

  • Supports optional export, ASCII variable names, single-line unquoted or quoted values and # comments. Whitespace outside quotes is trimmed; whitespace and # inside quotes are retained.
  • This deliberately limited grammar rejects multiline quoted values and embedded quote syntax. Backslashes are literal: no escape decoding, variable interpolation or shell execution. It is not a universal dotenv parser.
  • Keys are case-sensitive, empty and absent values differ, and duplicate definitions use the last value. Reports are newline-delimited JSON with localized labels, not executable .env files.

This tool processes your input in this browser and does not upload it for processing.

Worked example
A: PORT=3000
B: PORT=3001
Result: PORT → Changed (values masked by default)
A: TOKEN=example-a
   TOKEN=example-b
Duplicate: TOKEN, line 2; last value is used.

Frequently asked questions

Are secrets hidden everywhere?

No. The input editors show pasted text. Result cells and exported reports mask values by default; key names remain visible. Enabling reveal exposes values in both results and exports.

What happens with duplicate keys?

Each repeated assignment is listed with its line number. Comparison uses the last value for the key, so resolve unintended duplicates before relying on the result.

Can this compare every dotenv dialect?

No. It supports a documented single-line subset. Multiline values and embedded quotes are rejected. Backslashes and variable references are treated literally, so compare runtime-expanded configurations separately.

Related tools

Sources