.env · debug🔥 popular🔒 100% client-side — never leaves your browser

Missing Env Detector: find missing environment variables

Find missing environment variables before they crash your app: this missing env detector compares your .env with a list of required keys, a .env.example, or variables it finds in your source code (process.env.X, os.getenv("X"), ENV["X"] and more).

By Aliniyaz Mamat · last reviewed

Be the first to rate
2 issues across 4 required keys
missing2
JWT_SECRET
STRIPE_SECRET_KEY
empty0
— none —
ok2
DATABASE_URL
NODE_ENV
extra (unused)2
PORT
OLD_UNUSED_KEY

Key takeaways

  • ✓Three results: missing (not in your .env), empty (KEY= or only spaces) and extra (in your .env but not required).
  • ✓Code scan understands Node.js, Vite, Deno/Bun, Python, Django/Laravel env(), Ruby, PHP, Go, Java, .NET, Rust and GitHub Actions ${{ secrets.X }}.
  • ✓Dynamic lookups like process.env[name] can't be resolved statically; list those keys by hand.
  • ✓NODE_ENV, MODE, DEV, PROD, SSR and BASE_URL are skipped in code scans: frameworks set them for you.
  • ✓Missing keys are the number-one cause of "works locally, crashes in production".

What it does

  • ▸Compare a .env against required keys or a .env.example
  • ▸Scan pasted source code for env variable references in 10+ languages
  • ▸Separate missing, empty and extra keys
  • ▸Copyable checklist for tickets and PRs
  • ▸100% client-side

Privacy

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

client-side only

Usage examples

Case 1 · .env vs required list
# .env
DATABASE_URL=postgres://localhost/app
JWT_SECRET=
LEGACY_FLAG=1
# required
DATABASE_URL
JWT_SECRET
STRIPE_SECRET_KEY
missing: STRIPE_SECRET_KEY
empty:   JWT_SECRET
extra:   LEGACY_FLAG
Case 2 · Required keys from code
const db = new Pool({ connectionString: process.env.DATABASE_URL });
const key = import.meta.env.VITE_MAPS_KEY;
SENTRY_DSN = os.getenv("SENTRY_DSN")
required: DATABASE_URL, SENTRY_DSN, VITE_MAPS_KEY

When to use this tool

  • →Before the first deploy to a new environment
  • →After pulling a branch that added a new integration
  • →Auditing which keys in a production .env are no longer used anywhere (extra keys)
  • →Onboarding: checking a new developer's .env against the template

Common mistakes

  • ⚠Trusting an outdated .env.example: scan the code too, it's the real source of truth
  • ⚠Deleting "extra" keys blindly. Some are read by libraries, not your code (e.g. DATABASE_URL for Prisma, AWS_REGION for the AWS SDK)
  • ⚠Treating empty as fine: STRIPE_SECRET_KEY= passes an existence check and fails at the first payment
  • ⚠Checking only the app: workers, cron jobs and CI may need extra keys

Where to get the list of required keys

SourceReliabilityHow
Your source codehigh: it's what actually runsswitch to scan source code and paste the files that read env
Startup schema (zod, envalid, pydantic-settings)high, if kept up to datecopy the field names
.env.examplemedium: drifts over timepaste it as is, values are ignored
Hosting dashboard exportshows what is set, not what is neededuse it as the .env side

Quick way to collect code references across a repository:

# list every process.env / import.meta.env key used in src/
grep -rhoE '(process\.env|import\.meta\.env)\.[A-Z_][A-Z0-9_]*' src | sed 's/.*\.//' | sort -u

Failing fast when a variable is missing

The detector catches gaps before a deploy; a startup check catches them at deploy time, before the first request:

src/env.ts
import { z } from "zod";

export const env = z
  .object({
    DATABASE_URL: z.string().url(),
    JWT_SECRET: z.string().min(32),
    STRIPE_SECRET_KEY: z.string().startsWith("sk_"),
  })
  .parse(process.env); // throws with a list of every missing/invalid key

Python has the same pattern with pydantic-settings, see the Python .env generator. For the runtime symptoms of missing keys, read how to fix .env errors.

Keeping .env.example in sync

  1. Scan the code here and compare against .env.example as the .env side: missing keys belong in the template.
  2. Regenerate the template from a complete .env with the .env.example generator.
  3. Compare environments with the ENV diff checker before promoting a release.

Frequently asked questions

Where do I get the list of required keys?

Best from the code itself: switch to scan source code and paste the files that read configuration. A .env.example or the field list of your env schema also works.

Does it check values or only key presence?

Both presence and emptiness. A key that is missing is reported as missing; KEY= or a value of only spaces is reported as empty. It does not judge whether a value is correct; use the .env validator for format problems.

Which languages does the code scan support?

JavaScript/TypeScript (process.env, import.meta.env), Deno, Bun, Python (os.environ, os.getenv), django-environ and Laravel env(), Ruby ENV, PHP getenv/$_ENV, Go os.Getenv, Java/Kotlin System.getenv, .NET, Rust std::env::var and GitHub Actions expressions.

What does extra mean?

The key is in your .env but not in the required list. It may be dead configuration, or a variable a library reads on its own. Check before deleting.

Is my code or .env uploaded?

No. Parsing and scanning happen in your browser.

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.

We use your address only for this launch email. You can ask us to delete it at any time. Privacy policy