.env Example Generator
Create .env and .env.example Files
Turn a real .env file into a safe .env.example, or build a new environment file from scratch.
Keys and comments are kept; every value is blanked out so the file is safe to commit.
About .env Files
A .env file stores configuration and secrets - database passwords, API keys, and similar values - outside of your source code. It should never be committed to version control.
A .env.example file lists the same variable names with empty or placeholder values. It is safe to commit and shows other developers exactly which variables they need to set.