Skip to tool
Systems

Environment Matrix

Compare .env files, find missing keys, and create safe example files.

Input0 characters
Reference0 characters
Result0 characters
Ready

Prefer a native workflow?

Keep Environment Matrix one shortcut away.

DevSexy for Mac puts the same private workflow in a focused desktop app, with global shortcuts and no browser tab to manage.

Global shortcutOffline-readyLocal processing
Try the Mac app free

This browser tool remains free.

Configuration parity without secret exposure

.env File Comparator Online — Find Missing and Duplicate Keys

Compare .env files online, identify missing, extra, empty, duplicate, or changed keys, and keep secret values hidden unless you deliberately reveal them.

Key parity matrix

KeyDevelopmentStagingProductionAction
API_URLpresentpresentpresentvalue differs
LOG_LEVELpresentmissingpresentadd to staging
DEBUGpresentpresentextrareview production
DATABASE_URLemptypresentpresentfill development

Parser edge cases

There is no single dotenv specification shared by every loader.

NAME=value # note

Inline comment rules differ

export NAME=value

Accepted by some loaders

MULTILINE="one\ntwo"

Quoted newline semantics differ

NAME=value NAME=again

Duplicate precedence must be visible

The effective value depends on the loader order

  1. 1Process environment
  2. 2Mode-specific file
  3. 3Local override file
  4. 4Base .env file
  5. 5Application default

The exact order varies by framework and deployment platform. Select a dialect for syntax checks, then verify precedence against the runtime that will actually load the file.

A shareable report should reveal status, not secrets

DATABASE_URL=postgres://name:password@host/db
DATABASE_URL · present · changed · value redacted

Secret-looking key names are a review signal, not proof that the value is sensitive or already leaked.

Generate an example file, then review every placeholder

  1. 1 · Parse

    Preserve comments and key order where possible.

  2. 2 · Redact

    Replace values; do not copy credentials.

  3. 3 · Annotate

    Describe required format and safe defaults.

  4. 4 · Review

    Remove private hostnames and operational hints.

Before deployment

  • All required keys exist
  • No required value is empty
  • Duplicate keys are resolved
  • Environment-only extras are intentional
  • The runtime precedence order is documented

Environment file questions

Does a matching key set mean two environments are equivalent?
No. It only proves parity of names. Values, infrastructure access, loader order, and application defaults can still differ.
Should .env.example contain real values?
Use reviewed placeholders and clearly safe defaults. Never assume automatic redaction catches every credential, hostname, or account identifier.
Why do duplicate variables matter?
Many loaders use the first or last occurrence, so a duplicate can hide the value a developer thinks is active.

Run a reproducible example

Check key parity without revealing values and generate an example file with a documented retention policy.

Using an example replaces the current input, reference input, operation, and options. Public demonstration data only.

Compare configuration keys

Node dotenv dialect; include values is off. The two inputs have one shared and two unmatched keys.

Input

API_URL=https://api.example.test
DEBUG=false

Reference

API_URL=https://staging.example.test
EXTRA=true

Read the key-parity report without printing endpoint values.

API_URL
DEBUG
EXTRA

Create a public example template

The example operation clears most values but retains NODE_ENV, LOG_LEVEL, and PORT.

Input

API_KEY=public-demo
PORT=3000
LOG_LEVEL=info

The demo API key is cleared while PORT and LOG_LEVEL are retained. This is not a universal secret scrubber.

API_KEY=
PORT=3000
LOG_LEVEL=info

Continue with a related task

YAML & TOML Configuration Studio

Format and translate configuration data while exposing type and comment-loss boundaries.

Text Diff

Compare two texts by line, word, or character in a local worker.

URL Inspector & Query Editor

Separate, edit, encode, and rebuild every URL component.

Repeat the task in DevSexy for Mac

Use the native app for repeated offline work and direct Option shortcuts.

Direct answer

What is Environment Matrix?

Compare .env files online, identify missing, extra, empty, duplicate, or changed keys, and keep secret values hidden unless you deliberately reveal them.

What can it do?

  • Compare
  • Resolve
  • Example

How to use Environment Matrix

  1. 01

    Prepare the input

    Select Node dotenv or Compose and put each environment in its own pane.

  2. 02

    Choose the operation

    Compare keys with values hidden, or generate a template after checking retained key names.

  3. 03

    Review the evidence

    Review interpolation, duplicates, and retained values before using or sharing the result.