What is a ENV file?
ENV — environment variables
What is it?
A .env file holds environment variables: a key, an equals sign, a value, one per line. It's used to separate configuration from code — database addresses, access keys, passwords.
It's the most sensitive file in a project, and often the most carelessly handled.
History & origin
The practice spread alongside modern development methodologies, which hold as a matter of principle that configuration should never be hardcoded into the code itself.
The .env file became its concrete expression, adopted across virtually every language.
Why it is useful
Complete simplicity, and a clean separation between code and the secrets it relies on.
It lets you switch between environments — development, testing, production — without touching a single line of code.
Limits & drawbacks
It stores secrets in plain text. Nothing in it is encrypted, nothing is protected.
It's the most ordinary security leak there is: a .env file forgotten in a public repository or left on a misconfigured server, and your access keys belong to everyone.
Practical tips
Never share a .env file, and never commit it to version control. Exclude it systematically from your repository.
If a key has been exposed, don't bother trying to protect it after the fact: revoke it and generate a new one. That's the only valid response.
Convert your ENV in seconds, on our secure servers in France.
Convert a ENV