Skip to main content
Back to Dev generators

Dev

Env Variable Name Generator

A `.env` file with names like `db`, `key`, and `secret` is self-defeating — the next person to onboard will not know what they mean without reading the code. This tool returns a shuffled set of environment variable names in conventional `UPPER_SNAKE_CASE`, covering the categories most applications need. The only input is how many you want, from 1 to 10 (14 in the pool). The set includes database and cache URLs (`DATABASE_URL`, `REDIS_URL`), runtime settings (`PORT`, `NODE_ENV`, `LOG_LEVEL`), credentials (`JWT_SECRET`, `STRIPE_SECRET_KEY`, `AWS_ACCESS_KEY_ID`), communication config (`SMTP_HOST`, `SENTRY_DSN`), and patterns like `API_BASE_URL`, `SESSION_SECRET`, `ENABLE_FEATURE_X`, and `MAX_UPLOAD_SIZE_MB`. Drop these into a `.env.example` with placeholder values and keep the real `.env` out of version control.

Read the complete guide — 4 min read

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Choose how many variable names you want.
  2. Generate a set for your services and settings.
  3. Add them to a .env.example with placeholders.
  4. Document what each one expects.

Use Cases

  • Setting up configuration for a new project
  • Writing a .env.example template
  • Documenting required environment variables
  • Standardising config naming across services
  • Teaching environment variable conventions

Tips

  • Keep names UPPER_SNAKE_CASE for shell compatibility.
  • Group related settings with a shared prefix.
  • Commit .env.example, never the real .env.
  • Give each variable a documented default or example.

FAQ

why use UPPER_SNAKE_CASE for environment variable names

It is the long-standing Unix convention that shells, Docker, Kubernetes, and most languages expect. Using the standard casing makes variable names distinct from code identifiers and avoids compatibility issues across toolchains.

should I commit my .env file to version control

No. Commit a `.env.example` that lists every variable name with a placeholder, and add `.env` to `.gitignore`. The example file documents configuration without exposing secrets.

how should I organise related variables

Group them with a shared prefix — `AWS_`, `SMTP_`, `STRIPE_` — so related variables cluster when sorted. A prefix makes it clear at a glance which external service a variable belongs to, which matters when rotating credentials.

You might also like

Popular tools from other categories that share themes with this one.

Try these next

More free tools from other corners of the catalog, picked by shared themes.