Skip to main content

.env File Generator

New

Build .env and .env.example files from common presets or custom key-value pairs.

envdotenvconfiggenerate
Read the guide
Shortcuts:⌘ KSearch

Build .env and .env.example files from repeatable key/value rows.

Secret rows keep their real value in .env and use a placeholder in .env.example.

Frequently Asked Questions

What changes when I mark a row as Secret?

The real value stays in the generated .env file, but the .env.example file gets a placeholder like your_jwt_secret_here instead of the real secret.

Do the preset buttons know which keys are probably secrets?

Yes, in a simple way. Preset-added keys matching SECRET, PASSWORD, KEY, or TOKEN are auto-marked as secret when the rows are inserted.

Why are normal values blank in .env.example?

That is how this generator is written. Non-secret rows become KEY= with an empty example value, while only secret rows get explicit placeholders.

Will it quote values with spaces or # characters?

Yes. Values are left plain by default, but anything containing whitespace, #, or a double quote is JSON-quoted before being written.

Can this generate comments, export statements, or variable interpolation?

No. It only emits straightforward key=value lines for .env and .env.example.

Related Tools