Skip to tool
Systems

Environment Matrix

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

Web Worker Local onlyTools
Input0 characters
Reference0 characters
Result0 characters
Ready

Configuration parity without secret exposure

.env File Comparator & Validator — Find Missing and Duplicate Keys

Compare .env files locally, identify missing, extra, empty, duplicate, and changed keys, and keep 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.

Direct answer

What is Environment Matrix?

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

What can it do?

  • Compare
  • Resolve
  • Example

How to use Environment Matrix

  1. 01

    Choose a task

    Select Compare, Resolve, and Example in the workspace.

  2. 02

    Provide the input

    Paste the first environment file. The input stays in the browser processing path.

  3. 03

    Review the result

    Run the tool, inspect its result and diagnostics, then copy or download the output when the page offers that action.

Frequently asked questions

What is Environment Matrix?
Compare .env files locally, identify missing, extra, empty, duplicate, and changed keys, and keep values hidden unless you deliberately reveal them.
What can Environment Matrix do?
Environment Matrix supports Compare, Resolve, and Example. Each mode is available directly in the page workspace.
Does Environment Matrix upload my data?
Environment Matrix processes your input locally in the browser. DevSexy does not add an upload, account, or server-processing step to this workflow.
DevSexy processes tool input locally. No paste tracking, accounts, or upload step.