Environment File — Environment variables file for local application configuration.
Quick facts
What is .env
A .env file is a Environment File — Environment variables file for local application configuration.
In the mime-db registry it has no registered standard MIME type. When serving this file over HTTP, use a Content-Type that matches its actual format.
How to open .env files
Developer info
When served over HTTP, responses should set the following header:
# No standard MIME type is registered for .env
Common software that reads/writes .env:
Relation chain
Related extensions
Related programming languages
Common uses
How to edit .env files
How to create .env files
Example
DATABASE_URL=postgres://localhost:5432/app PORT=3001
Frequently asked questions
Common options include VS Code, dotenv. You can also open many of these files with built-in viewers or a browser.
Create a new file in any text editor or the app that owns the format and save it with the .env extension.
Sources & standards
Updated 2026-08-18
Explore this reference