dmosk / envdiff

Compare .env, JSON, TOML and ini by keys

Pick a format, paste or upload two configs and see keys only on the left, only on the right, or with different values. Everything runs in the browser.

One format applies to both sides. The Share link puts both texts into the # fragment of the URL — it is not sent to the server, but do not share the link if it contains real secrets.

Left

Right

Why use envdiff

  • Logical comparison. Keys and values are compared, not text lines — order, comments and blank lines do not matter.
  • Four formats. .env, JSON, TOML and ini; nested JSON/TOML keys become paths like db.host.
  • Secret masking. Optionally show values of keys like password, token, secret or key as [REDACTED].
  • Browser-only. No API: files never leave your device. Share the state through the URL fragment.

How to compare configs

  1. Choose the format — it applies to both sides.
  2. Paste text or upload a file into each panel; both are required.
  3. Press Compare to see keys only on the left, only on the right, and with changed values.
  4. Turn on masking if needed and press Share to copy a link with the state.

Keys, formats and secrets

envdiff compares keys, not lines. Formats are never mixed: nested JSON and TOML are flattened into dotted paths, ini sections become section.key, and .env is read as KEY=VALUE.

Tips:

  • Comments, blank lines and key order are ignored.
  • Arrays are flattened with indexes, for example servers[0].host.
  • Values are compared as text: the number 5432 in JSON equals 5432 in .env.
  • Masking only changes the display: keys such as password, token, secret or key show [REDACTED].
  • For YAML use yamaster; to look for leaked secrets use secret-scanner.

What it is for

  • comparing .env between dev, staging and production;
  • checking a config before and after a deploy;
  • finding keys that are missing in one environment;
  • reviewing JSON, TOML or ini changes without a noisy text diff;
  • sharing a comparison via URL (without real secrets).

FAQ

Can I compare different formats?

No. One format is chosen for both sides — mixing formats is not supported.

Do comments and order matter?

No. Only keys and values are compared.

Is my data uploaded?

No. Parsing and comparison run in the browser; there is no API.

What does masking do?

Values of keys like password, secret, token or key are shown as [REDACTED]; the comparison itself uses the real values.

How are nested keys shown?

With dots for objects and tables and with indexes for arrays, for example db.host or servers[0].