Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Dotenv & .env File EditorNew to Visual Studio Code? Get it now.
Dotenv & .env File Editor

Dotenv & .env File Editor

Zovo

| (0) | Free
| Sponsor
Dotenv support for .env files: syntax colors, secret values hidden on screen, problems with quick fixes (duplicates, spaces, quotes), outline, formatter, and hover and go to definition from process.env. Offline.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Dotenv & .env File Editor

Read and fix .env files in VS Code without putting your secrets on screen. Values of keys such as DB_PASSWORD or STRIPE_SECRET_KEY show as dots until the cursor is on their line, so you can share your screen or record a demo. Works offline, with no account.

A .env file in VS Code: syntax colors, secret values shown as dots, a duplicate key and spaces around = underlined with their quick fix

Free

  • Syntax colors for .env, .env.local, .env.production, *.env and .flaskenv: keys, export, quoted and unquoted values, multi-line values, ${NAME} references, inline comments.
  • Secret values hidden on screen (display only, the file is not changed). The line under the cursor shows its value; the eye button in the editor title shows them all. Templates such as .env.example are never hidden.
  • Problems with quick fixes: a key set twice, spaces around =, a quote that is never closed, a line with no =, an invalid name, trailing spaces, ${NAME} that no line sets.
  • Format Document removes the spaces around = and trailing spaces; comments, order and quotes stay as they are.
  • Outline of the keys, and Copy the Value on This Line.
  • From code: hover process.env.DB_HOST, import.meta.env.VITE_URL, os.environ["X"], os.getenv("X"), os.Getenv("X"), ENV["X"], System.getenv("X"), env("X") and more to see which .env file sets it; F12 opens that line; completion offers the keys after process.env..

Zovo Pro

Zovo Pro: USD 19 once. One payment unlocks the Pro tools in every Zovo extension. Each Pro tool has 3 free tries:

  • Compare .env with .env.example: the keys missing from .env, the keys .env.example does not document and the empty ones, then add the missing keys to either file. Values from .env are never shown or copied.
  • Find keys missing in code or .env: reads the code of the workspace (JS, TS, Python, Ruby, Go, Java, Kotlin, C#, PHP, Rust, YAML, shell) and lists the variables that code reads and no .env sets, and the keys no code reads, with file and line.
  • Convert .env to JSON, YAML, Kubernetes: a JSON object, YAML, a Docker Compose environment: block, a Kubernetes Secret (base64) or ConfigMap, a GitHub Actions env: block with secrets as ${{ secrets.X }}, or shell exports.

How to use it

Open any .env file. Problems show in the Problems panel; press Ctrl+. (Cmd+. on macOS) on one for its fix. Commands are under Dotenv in the Command Palette:

Command What it does
Show or Hide Secret Values Shows every value until you click again or reload the window (also the eye button and the status bar item on .env files)
Copy the Value on This Line Copies the value under the cursor, quotes and escapes removed, even while it is hidden
Open the Sample .env File A made-up .env with every case

Hovering process.env.DATABASE_URL in a TypeScript file shows the .env files that set it, with the secret value hidden

Settings

  • envFile.maskValues: secrets (default: names with PASSWORD, TOKEN, SECRET, API_KEY, DSN, DATABASE_URL, ...), all or off.
  • envFile.unmaskedFiles: file names that are never hidden (default .env.example, .env.sample, .env.template, .env.dist, .env.defaults).
  • envFile.diagnostics, envFile.codeHover, envFile.completion: turn each part off.
  • envFile.hoverShowsSecrets: also show secret values in code hovers (default off).

The Pro tools in use

The compare report: keys missing from .env and keys .env.example does not document, with buttons to add them

The Pro tools are in the Command Palette (they end in "(Pro)") and in the Explorer right-click menu of .env files and folders. Each one has 3 free tries on this computer; a try counts only when the tool produced its report or file (Escape or Cancel never uses one). Nothing about Pro shows when you open a file. envFile.showProTools: false hides all of it.

Zovo Pro is USD 19 once (team of 5: USD 59) and unlocks the Pro tools in every Zovo extension. Run Zovo Pro: Get Zovo Pro to pay by card, with GitHub Sponsors or PayPal, or to enter a key.

Privacy

No network requests and no telemetry. .env files are read on your computer only, and hidden values stay hidden in the outline, hovers and completions unless you turn that off.

Known limits

  • Hiding is for the screen only. The text is still in the file, in the minimap shape and in search results, and copy and paste copy the real value.
  • .envrc (direnv) is a shell script and is left to shell extensions.
  • The code report sees literal names (process.env.API_KEY, os.getenv("API_KEY")); names built at run time are not found.
  • Problems follow the dotenv package rules; a few tools (Docker Compose v1, systemd) are stricter, which is what the warnings point out.

Support Zovo

Zovo Pro: USD 19 once, every Zovo viewer. Get Zovo Pro on GitHub Sponsors to turn on the Pro tools in this extension and in the other Zovo extensions you use. The free features stay free.

Zovo extensions have no ads and no tracking. They are made by theluckystrike on GitHub. You can also support the work with no Pro:

  • Sponsor on GitHub
  • PayPal
  • Follow theluckystrike on GitHub

Need your format supported?

Open a format request with a sample file, and I reply there whether it can be done. For USD 299 once, through this GitHub Sponsors tier, I add your file format or a missing feature to this extension, with tests, within 7 days.

More tools by Zovo

  • PDF Viewer & PDF Reader to Read and View PDF (Dark Mode) reads PDFs with a real dark mode, search, an outline and thumbnails.
  • XLSX Viewer, Excel Viewer, CSV Viewer & Parquet Viewer (XLS, CSV Preview) opens CSV, TSV, Excel and Parquet files as a sortable, filterable table.
  • DOCX Viewer & ODT Viewer, Word Document Preview (Dark Mode) previews Word and ODT files with dark mode, an outline and search.

See all Zovo extensions on the Marketplace.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft