Configuration checks

ENV diff

Put expected variables in A and the actual configuration in B. Try keys-only mode when checking an example file.

ENV diff

Baseline A

Target B

Runs in your browser. Inputs stay in memory, without URLs, telemetry or local history.

Comparison options

Masking covers results and exports. Raw inputs remain visible. Keys-only mode omits every value.

Enter at least one configuration. An empty side is allowed.

ENV diff helps investigate the configuration gap behind a deployment that works locally but fails elsewhere. Matching assignments by name removes the noise of moved lines, so a missing variable is visible even when both files use different ordering.

A baseline is a reference, not a source of correct production secrets. Review every missing key with the application requirements before filling it in; an empty assignment is present but may still be unusable.

Why use ENV diff?

Separate missing keys from intentional value changes

With ENV diff, a production token can differ from a template placeholder without distracting from missing names. Enable keys-only mode for coverage checks; use full comparison when investigating an unexpected port or endpoint.

Two configuration lists aligned by key, showing an added row, a missing row and a changed pair.

Keep values out of the report until needed

Results start with a fixed mask for every value. Copy and download use the same visibility setting, including values whose key names do not look sensitive. The original editors remain readable.

A comparison report with fixed masks replacing values while the key markers remain visible.

Make the comparison meaningful

01

Choose the direction first

Place .env.example in A and your deployment configuration in B. “Missing in B” now means the target lacks a documented variable. Swapping the content reverses the meaning of added and missing.

02

Choose presence or value comparison

Keys-only mode ignores differences between shared values entirely. For full comparison, list deliberate exceptions by exact key name; ignoring PORT does not ignore PORT_EXTRA.

03

Export a current snapshot

Edits invalidate the report immediately. Wait for the 350 ms automatic update, or disable automatic mode and use Ctrl/Cmd + Enter. Check duplicate assignments before exporting.

Inspect the configuration gap

Three actionable groups

ENV diff separates keys added to B, keys absent from B and changed values. Matching keys are counted without filling the result with unchanged assignments. Names use stable alphabetical order.

Missing environment variables, not moved lines

Compare .env files without sorting the source first. Comments, blank lines and assignment order do not create changes. An empty value counts as a defined key, which makes template checks predictable.

One complete report

The .env.example comparison can exclude exact names separated by commas or new lines. The screen reveals results in batches of 100; the downloaded text contains every difference and duplicate warning.

Parsing rules and limits

A documented dotenv subset
Names use ASCII letters, digits and underscores and cannot start with a digit. An optional export prefix is accepted. Unquoted # starts a comment; quote a URL or token if it contains a literal hash. Values remain strings, so 01 and 1 differ.
Quotes preserve meaningful content
Single and double quotes may span lines. Double quotes decode \n, \r, \" and \\; other escapes stay literal. Single quotes preserve backslashes. Unclosed quotes, backticks and unquoted backslash continuations stop the comparison.
Duplicates and errors stay visible
The last assignment for a key wins, with the earlier and later line numbers reported. Invalid lines block the complete report instead of being skipped. Each side accepts at most 1 MiB and 10,000 assignments.
No runtime expansion or automatic repair
${HOST}, $HOST and command substitutions are compared as text. The tool does not execute a shell, test credentials, merge configurations or generate missing secret values. It checks the two supplied files, not the running process.
Two text inputs, exact exclusions
Paste content into two editors; file uploads, URL imports, third environments and repository scanning are outside this page. Ignore names are case-sensitive and support neither wildcards nor regular expressions.

ENV diff questions

How can I compare .env configurations online?

Paste the reference into A and the target into B. Automatic mode runs after a short pause. ENV diff compares parsed keys and values, so different line ordering alone produces no differences.

How can I locate variables absent from production?

Use the expected configuration as A, then inspect Missing in B. To check only whether names are present, enable keys-only mode. A variable assigned an empty string is not missing; review whether your application permits that value.

How can I check my .env against its example file?

Paste the example in A and the real configuration in B, then enable keys-only comparison. Placeholder values often differ intentionally. An outdated example cannot reveal a requirement that is absent from both files.

Which syntax problems are checked?

The parser checks assignment syntax, key names, closed quotes and content after quoted values. It reports the input side and position. Duplicate assignments are warnings with the last definition selected; other syntax errors prevent export.

Can variables be sorted alphabetically?

Result groups are sorted by key automatically. The input files are never sorted or rewritten. This preserves comments and line positions so you can locate the corresponding assignments in the original configuration.

Something wrong with the comparison?

Run an ENV diff before deployment

Check names, review changes, and export the report only after its counts match what you expected.