.env to .env.example Generator

Paste a .env file and get a .env.example that is safe to commit: keys, passwords and connection strings are masked, comments and harmless settings are kept.

Runs in your browser: input and output are never sent to the server, and the platform does not store your input.

Input

Not stored

Output

Fill in the fields on the left, then run.

How to use

  1. 1Paste the whole .env file.
  2. 2Pick a masking mode — “Keep safe values” keeps settings like PORT and NODE_ENV.
  3. 3Save the result as .env.example and commit it so others know which variables they need.

FAQ

Is my .env uploaded?

No. The tool runs entirely in your browser; the contents never reach a server and are never logged.

How are secrets detected?

Anything whose name contains SECRET, TOKEN, PASSWORD, KEY, DATABASE_URL and similar, or whose value looks like an OpenAI, Stripe, GitHub or AWS key, a JWT, a private key or a URL with a password, is masked.

Why should I still review it?

No detector covers every custom key format. “Keep safe values” only keeps obviously harmless values, but a quick look before committing is still the most reliable safeguard.

What if my .env was already committed?

Removing it from the repo is not enough — the keys remain in git history. Revoke and regenerate them with each service right away, then add .env to .gitignore.