.env File Diff Comparator

Compare two .env files to spot missing keys, extra keys, and changed values. Secret values stay masked by default and nothing leaves your browser.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.

Environment Files

Comparison Breakdown

Missing in B
0
Extra in B
0
Changed Value
0
Identical
0
Paste two .env files above or click Load Sample to compare keys.

About This Tool

Compares two .env files side by side to catch missing environment variables before deployment -- such as comparing .env.example against .env.local or staging against production.

Understands comments, inline # notes, export prefixes, single/double quotes, and multiline PEM keys. Values are masked by default so you can safely compare secrets on a shared screen.

Key Features

  • Full .env syntax parser: Handles # comments, export KEY=VAL prefixes, single and double quotes, escape sequences, and multiline quoted values.
  • Masked values by default: Replaces secret values with character-length masks (••••••••) until you toggle Reveal values.
  • Four-way classification: Groups variables into Missing in B, Extra in B, Changed values, and Identical keys.
  • Copy missing keys template: One click copies all keys missing from B as a ready-to-paste .env stub.

Frequently Asked Questions

Are my .env secrets sent over the network?
Never. All parsing and comparison happen inside your browser memory with zero network requests.
Why are values masked by default?
Developers frequently compare production .env files during screen-shares or pairing sessions. Masking values by default shows whether values match or differ (and their character length) without exposing raw API keys on screen.
Does the parser support export prefixes and multiline strings?
Yes. Lines starting with export KEY=value have the export keyword stripped automatically, and double- or single-quoted values spanning multiple lines (such as RSA private keys) are parsed as a single variable.
How are inline comments handled?
In unquoted values, a # preceded by whitespace starts an inline comment and is stripped. Inside quoted values, # characters are preserved literally.