.env File — Environment Variables File
text/plain
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .env file here or click to choose
Or drop any file to identify its extension
text/plainQuick Facts
| Extension | .env |
| Full Name | Environment Variables File |
| MIME Type | text/plain |
| Category | Config |
| Type | Text-based (human-readable) |
| Typical Size | 100 B – 5 KB |
| First Appeared | 2012 |
What Is a .env File?
ENV files store environment variable definitions as key-value pairs, one per line, in the format KEY=value. Popularized by the Twelve-Factor App methodology and the dotenv libraries, .env files provide a convenient way to manage application configuration — especially secrets like API keys, database URLs, and service credentials — without hardcoding them in source code. The .env format supports comments (# prefixed), quoted string values, multi-line values, variable interpolation in some implementations, and empty values. The dotenv pattern has been adopted across virtually every programming ecosystem: dotenv for Node.js, python-dotenv for Python, godotenv for Go, and similar libraries for Ruby, PHP, Java, and others. Docker Compose, Vite, Next.js, and many frameworks natively support .env files. By convention, .env files should never be committed to version control (they're listed in .gitignore) since they typically contain secrets. Instead, .env.example files are committed as templates showing required variables without actual values. Environment-specific variants like .env.development, .env.production, and .env.local provide configuration layering for different deployment contexts.
How to Open .env Files
Related File Extensions
More Config File Extensions
Other config formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.