.env

How to open a .env file

Quick, free ways to open ENV on any system.

A .env file is a Environment Variables File. If double-clicking does nothing, your computer simply does not have an app that reads ENV yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .env file step by step

  1. Confirm the file really is a .env. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with VS Code or Notepad++.
  3. On Mac, use VS Code or TextEdit.
  4. On Linux, try VS Code or nano.
  5. Still stuck? Search for a dedicated ENV viewer.

Best apps to open .env files

Windows

  • VS Code
  • Notepad++
  • any text editor

macOS

  • VS Code
  • TextEdit
  • any text editor

Linux

  • VS Code
  • nano
  • any text editor
!
Before you open it: Handle with care. A .env file is plain text and does not execute, but it usually contains secrets. Never commit one to a public repository or share it.

Frequently asked questions

Why can't I open my .env file?

Almost always because no installed app understands ENV. Install one of the apps above, or convert the file to a format your existing software already reads.

How do I open a .env file?

Any text editor opens it. In some file managers you may need to show hidden files, since names beginning with a dot are hidden by default.

Why is my .env file not being read?

The app must load it (many use a dotenv library), the file must sit where the app looks, and each line must be NAME=value with no spaces around the equals sign.

Learn more about .env