--- title: ".env file — what it is and how to open it" description: "A .env file is an Environment Variable File. A list of KEY=value settings for an application — and often full of secrets. How to open one on Windows, macOS and Linux, and what to convert it to." url: https://atoneplace.net/file/env/ site: "At One Place" --- # .env files **.env file: Environment Variable File** A list of KEY=value settings for an application — and often full of secrets. ## What opens a .env file - **Windows:** Visual Studio Code, Notepad (built in), Notepad++ - **macOS:** Visual Studio Code, TextEdit (built in), nano - **Linux:** Visual Studio Code, Text Editor (built in), nano ## What a .env file is A .env file supplies environment variables to an application at startup, typically database URLs, API keys and passwords, and is read by tools like Docker Compose and the dotenv libraries. It is plain text with no encryption whatsoever, which is why .env is in almost every .gitignore and why an accidentally published one is a genuine security incident. On macOS and Linux the leading dot also hides it from the file manager by default. ## Converting it A .env file is commonly converted to .txt. It is a plain text format, so any text editor can open and edit it directly. ## Details - **Extension:** .env - **Full name:** Environment Variable File - **Category:** Data - **MIME type:** text/plain - **Created by:** dotenv convention - **Format:** Plain text ## Common questions ### How do I open a .env file? On Windows use Visual Studio Code; on macOS use Visual Studio Code; on Linux use Visual Studio Code. A list of KEY=value settings for an application — and often full of secrets. ### What is a .env file? Environment Variable File. A .env file supplies environment variables to an application at startup, typically database URLs, API keys and passwords, and is read by tools like Docker Compose and the dotenv libraries. It is plain text with no encryption whatsoever, which is why .env is in almost every .gitignore and why an accidentally published one is a genuine security incident. ### Can I convert a .env file? Yes. It is usually converted to .txt, either by exporting from one of the programs listed above or with a format converter. ## Related pages - [.csv — Comma-Separated Values](https://atoneplace.net/file/csv/) - [.json — JavaScript Object Notation](https://atoneplace.net/file/json/) - [.xml — Extensible Markup Language](https://atoneplace.net/file/xml/) - [.yaml — YAML Data File](https://atoneplace.net/file/yaml/) - [.log — Log File](https://atoneplace.net/file/log/) - [.torrent — BitTorrent Metainfo File](https://atoneplace.net/file/torrent/) - [.dat — Generic Data File](https://atoneplace.net/file/dat/) - [.vcf — vCard Contact File](https://atoneplace.net/file/vcf/) - [.sql — SQL Script](https://atoneplace.net/file/sql/) - [.ics — iCalendar Event](https://atoneplace.net/file/ics/) - [.sqlite — SQLite Database](https://atoneplace.net/file/sqlite/) - [.db — Generic Database File](https://atoneplace.net/file/db/) ## Sources - Media Types Registry — IANA (https://www.iana.org/assignments/media-types/) - Official vendor product documentation — At One Place (/about/)