Zero Signup ToolsFree browser tools

Developer Tools

Dotenv Diff Checker

Compare two .env files and see which keys are missing, added, or changed. Quote-aware parsing, secret masking, and a copy-ready patch output.

Compare

Two .env files, key by key

12 keys
14 keys

Summary

13 differences found.

3 only in B1 only in A9 changed2 equal

Keys to add to B

These keys exist in A but are missing from B.

LOG_FORMAT

Keys to add to A

These keys exist in B but are missing from A.

DATABASE_TIMEOUT
REFRESH_TOKEN_TTL
SENTRY_DSN

Differences

  • Value changedNODE_ENV

    A

    line 2
    development

    B

    line 2
    production
  • Value changedPORT

    A

    line 3
    3000

    B

    line 3
    8080
  • EqualAPP_NAME

    A and B

    line 4
    My App
  • Value changedDATABASE_URL

    A

    line 7
    postgres://user:password@localhost:5432/app_dev

    B

    line 7
    postgres://app:s3cr3t@db.prod.example.com:5432/app
  • Value changedDATABASE_POOL_MAX

    A

    line 8
    10

    B

    line 8
    50
  • Value changedDATABASE_SSL

    A

    line 9
    false

    B

    line 9
    true
  • Value changedJWT_SECRETmasked

    A

    line 12
    de****************me

    B

    line 13
    pr*******************12
  • Value changedSESSION_TIMEOUT

    A

    line 13
    3600

    B

    line 14
    1800
  • Value changedFEATURE_BILLING

    A

    line 16
    false

    B

    line 18
    true
  • EqualFEATURE_NEW_DASHBOARD

    A and B

    line 17
    true
  • Value changedLOG_LEVEL

    A

    line 20
    info

    B

    line 22
    warn
  • Only in ALOG_FORMAT

    A

    line 21
    pretty
  • Only in BDATABASE_TIMEOUT

    B

    line 10
    30000
  • Only in BREFRESH_TOKEN_TTLmasked

    B

    line 15
    25****00
  • Only in BSENTRY_DSNmasked

    B

    line 23
    ht********************************/0

How to use

  1. Paste your first .env file into A (for example .env.example or .env.staging) and the file you want to compare against into B (for example .env.production).
  2. Read the summary tiles for at-a-glance counts of Only in A, Only in B, Changed, and Equal keys.
  3. Use the two missing-keys panels to copy the list of variables you need to add to each side directly into your config.
  4. Filter the differences list by status to zoom in on changed values, missing keys, or matches.
  5. Toggle Case-insensitive keys, Trim values, Treat empty as missing, and Mask likely secrets to match your team's convention and protect credentials in screenshots.
  6. Click Copy patch to grab a plain-text diff ready for a Slack thread, ticket, or pull-request comment. Use Swap sides to flip A and B, or Clear both to start over.

About this tool

Dotenv Diff Checker compares two .env files and reports exactly which environment variables are missing, added, or have changed values, so you can spot drift between .env.example and .env.production, between staging and production, or between a teammate's local file and the committed example. Paste your two files into A and B and the result updates as you type. The parser implements the practical subset of dotenv syntax that real libraries accept, including KEY=value lines with optional `export ` prefix, double-quoted values with \n \r \t \\ \" escapes that may span multiple lines, single-quoted literal strings, blank lines and `#` comments, end-of-line comments after unquoted values, and duplicate keys where the last value wins. Each key is classified as Only in A (missing from B, often a removed variable), Only in B (new variable added since last sync), Value changed (same key, different resolved value), or Equal (same value on both sides). The summary shows totals at a glance, and dedicated panels list the keys you need to add to each side so you can paste them straight into the missing file. A side-by-side value view shows both resolved values with source line numbers, lets you copy the key, and warns about duplicate keys in either file. Options tune the comparison for your team's convention: case-insensitive keys folds DATABASE_URL and database_url together, trim values strips surrounding whitespace before comparing, treat empty as missing counts KEY= the same as a missing key, and mask likely secrets hides values for keys like SECRET, TOKEN, KEY, PASSWORD, PRIVATE, DSN, and JWT so you can share screenshots without leaking credentials. A Copy patch button emits a diff-style text block (`+ KEY=value`, `- KEY=value`, `~ KEY:` with before / after) ready for a Slack thread, ticket, or pull-request comment. Useful for site reliability engineers reconciling .env.example with the real .env.production, developers onboarding a new repo and wondering which variables they are missing, CI/CD owners verifying that secrets in staging match production before a deploy, and security reviewers diffing the variables provisioned to a serverless function against the documented baseline. Everything parses in your browser using local string operations, so the secrets in your .env files stay on your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsDeveloper Tools