Instantly convert between .env and JSON formats — bidirectional, fast, and simple.
.env→JSON— Convert environment variable files to JSONJSON→.env— Convert JSON files to .env format- Format Document — Clean up
.envfiles withShift+Alt+F(trims whitespace, removes duplicate blank lines) - In-place conversion — Replace content in the current editor
- Selection support — Select specific lines to convert only the selection
- New tab output — Open conversion result in a new untitled tab
- Right-click menu — Context menu shows all commands for easy back-and-forth conversion
- Keyboard shortcuts — Fast conversion with hotkeys
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and search for:
| Command | Description |
|---|---|
Envify: Convert .env to JSON |
Replace current content with JSON |
Envify: Convert JSON to .env |
Replace current content with .env |
Envify: Convert .env to JSON (New File) |
Open JSON result in a new tab |
Envify: Convert JSON to .env (New File) |
Open .env result in a new tab |
| Shortcut | Action |
|---|---|
Ctrl+Shift+J / Cmd+Shift+J |
Convert .env → JSON |
Ctrl+Alt+E / Cmd+Alt+E |
Convert JSON → .env |
Press Shift+Alt+F (Mac: Shift+Option+F) while editing a .env file to auto-format:
- Trims whitespace around
=—KEY = value→KEY=value - Removes trailing whitespace on each line
- Collapses consecutive blank lines into one
- Ensures a trailing newline at end of file
Right-click in the editor to see all Envify commands in the context menu.
Before:
DATABASE_URL=postgres://localhost:5432/mydb
API_KEY=sk-1234567890
DEBUG=true
APP_NAME="My App"After:
{
"DATABASE_URL": "postgres://localhost:5432/mydb",
"API_KEY": "sk-1234567890",
"DEBUG": "true",
"APP_NAME": "My App"
}Before:
{
"DATABASE_URL": "postgres://localhost:5432/mydb",
"API_KEY": "sk-1234567890",
"DEBUG": "true",
"APP_NAME": "My App"
}After:
DATABASE_URL=postgres://localhost:5432/mydb
API_KEY=sk-1234567890
DEBUG=true
APP_NAME="My App"- Handles quoted values (single and double quotes)
- Handles escape sequences (
\n,\t,\\,\") - Skips comments and empty lines in .env files
- Nested JSON objects are stringified when converting to .env
Envify works 100% offline. Your .env secrets never leave your machine.
- No network requests — no data is sent to any server
- No telemetry or analytics
- No file system access — conversion happens entirely in the editor
- Zero runtime dependencies — no third-party code runs behind the scenes
- Source code is open and auditable on GitHub
MIT