.env · workflow

ENV Merger

Merge .env.base with .env.local and environment overrides. Configurable precedence and conflict resolution.

Be the first to rate
later files override earlier ones
#1
#2
NODE_ENV=development
PORT=3000
DATABASE_URL=postgres://localhost/local
DEBUG=true
source of each key
  • NODE_ENV.env.base
  • PORT.env.base
  • DATABASE_URL.env.local
  • DEBUG.env.local

What it does

  • Merges any number of .env files in order
  • Later files override earlier ones (standard dotenv behavior)
  • Shows which keys came from which file
  • Copy or download the merged output
  • 100% client-side

Privacy

Runs 100% in your browser. Your .env never touches our servers.

client-side only

Usage examples

Case 1 · Base + local override
// .env.base
DATABASE_URL=postgres://localhost/dev
PORT=3000

// .env.local
DATABASE_URL=postgres://localhost/mine
DATABASE_URL=postgres://localhost/mine   (from .env.local)
PORT=3000                                 (from .env.base)
Case 2 · Three-layer merge
// .env          → FEATURE_X=false
// .env.staging  → FEATURE_X=true
// .env.local    → FEATURE_X=debug
FEATURE_X=debug   (from .env.local — the last layer wins)
Case 3 · Non-conflicting merge
// .env.base  → NODE_ENV=production
// .env.prod  → CACHE_URL=redis://...
NODE_ENV=production   (from .env.base)
CACHE_URL=redis://... (from .env.prod)

When to use this tool

  • Previewing what your app will actually see after .env.base + .env.local merge
  • Onboarding — merging company .env.team with your personal .env.local
  • Testing how a new .env.production would layer over staging
  • Debugging which of 3+ env files is setting a surprising value

Common mistakes

  • Assuming the first file wins — dotenv precedence is last-file-wins by default
  • Forgetting that shell env beats every .env file in most runtimes
  • Merging test + prod files by accident — keep environments strictly separate
  • Committing the merged output (if it has secrets) — use it for preview only

ENV Merger — combine multiple .env files

Most dotenv libraries load files in order — .env.base, then .env.local, then .env.development — with each layer overriding the previous. This tool mirrors that behavior in the browser so you can preview the final merged config before shipping.

Related tools

Learn more

coming soon

Get notified when env syncing launches

We're building a tiny tool to keep .env files in sync across teammates and environments. Leave your email — no spam, just a single launch ping.