.env Generator
Generate a .env.example or local .env file for Laravel, Node.js, Next.js, Django or Rails, with every secret left empty.
Choose your framework and services to get a clean, commented .env.example - secrets stay empty and nothing leaves your browser.
Passwords, keys and tokens are always left empty - fill them in on your machine. Nothing you type here leaves your browser.
More Developer Documentation / Project Tools
View all 11Never commit a real .env file - add it to .gitignore and share only .env.example.
What Is the .env Generator?
It builds a starter .env.example or local .env file for Laravel, Node.js, Next.js, Django, Rails or a generic app, with sections for the database, Redis, SMTP mail, S3 storage and a third-party API. Every password, key and token is left empty on purpose: the tool never generates, stores or transmits secrets.
Why and When to Use It
Environment variables keep configuration and secrets out of your code. A committed .env.example documents which variables exist without exposing any values, so a new developer can copy it to .env and fill in their own. Use the generator when starting a project, adding a service, or documenting the variables of an existing one.
How to Use It
- Choose the framework and whether you want a
.env.example(safe to commit) or a local.envwith development defaults. - Tick the sections you need and pick the database.
- Generate, then copy or download the file.
Example
For Laravel with MySQL, the local file contains DB_CONNECTION=mysql, DB_HOST=127.0.0.1, DB_PORT=3306 and an empty DB_PASSWORD=. For Node.js the database becomes a single DATABASE_URL.
Understanding the Output
Variable names follow each framework's own conventions, so they work with its default config files. Empty values are the ones you must fill in. In Next.js, anything prefixed NEXT_PUBLIC_ is sent to the browser, so never put a secret there.
Limitations
The file is a starting point, not a complete config for every package you use. Keep .env out of Git with the .gitignore Generator, check the syntax with the .env Validator, and for Docker Compose files use the Docker Compose Environment Validator.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.