Menu

.env File Maker

Build a .env and a matching .env.example from your variable names — entirely in your browser. This tool never asks for real secret values.

Build Your Env FilesFree
Only enter variable names and safe placeholder values here (e.g. sk_test_xxxxxxxx, not a real key). This tool runs in your browser and never sends anything anywhere — but a placeholder is still the right habit, since .env.example is meant to be committed to git.
Variable NameExample Value (for .env.example)Description (optional)
.env (fill in locally, never commit)
.env.example (safe to commit)
Add this to your .gitignore: .env
About .env Files

A .env file holds configuration and secrets as simple NAME=value lines, loaded into your app's environment at startup. The convention that keeps teams out of trouble is splitting it in two: a real .env that never leaves your machine, and a .env.example with the same variable names and harmless placeholder values that does get committed, so anyone cloning the repo knows exactly what to configure.

Why This Tool Only Asks for Placeholders

There's no technical reason a form couldn't accept a real secret and hand back a file — but that's exactly the habit worth avoiding. Typing a real production key into any web form, even one that (like this one) never transmits it anywhere, normalizes a risky pattern. This tool is scoped to what you actually need before you have real secrets: the shape of your config.

What To Do With Real Secrets

SituationRecommended approach
Local developmentPaste real values directly into your local .env — never through a web tool
Sharing secrets with teammatesA password manager (1Password, Bitwarden) or a secrets tool built for it (Doppler, Vault, SOPS)
CI/CD and productionYour platform's own secret store (GitHub Actions secrets, Vercel/Netlify env vars, AWS Secrets Manager, etc.)
A secret accidentally committed to gitRotate it immediately, then scrub git history with git-filter-repo or BFG Repo-Cleaner

Frequently Asked Questions

Does this store or see my real API keys?
No. This tool only ever asks for variable names and safe placeholder/example values meant for .env.example. It never asks for, transmits, or stores a real secret, and all generation happens in your browser.
What's the difference between .env and .env.example?
.env holds your real local values and should never be committed to git. .env.example lists the same variable names with safe placeholder values and is meant to be committed, so teammates know what variables to set.
Should I commit .env to git?
No, never. Add .env to your .gitignore (this tool shows you the line to add) and only commit .env.example.
What if I've already committed a .env file with real secrets?
Removing the file from the latest commit isn't enough — it stays in git history. Rotate every exposed secret immediately, then use a tool like git-filter-repo or BFG Repo-Cleaner to purge it from history, and add .env to .gitignore going forward.
Can I use this for other languages, not just Node.js?
Yes. The NAME=value format is used by dotenv-style loaders across Node.js, Python (python-dotenv), Ruby, PHP, Go, and most frameworks that support environment-based configuration.