vscode-inline-encrypt
Table of Contents

Français, English, Español, German, Dutch, 简体中文, 繁體中文, 日本語
Introduction
vscode-inline-encrypt
is a lightweight VSCode extension that lets you encrypt and decrypt text snippets without leaving your editor.
It integrates with GnuPG (gpg
) so you can reuse your existing key pairs and workflows.
Typical use cases:
- Hide API keys or sensitive passwords in a Markdown note.
- Share encrypted snippets in Git repositories without exposing secrets.
- Work on multiple machines while using the same GPG identity.
This is a community-driven project.
If you find it useful and want to support its development, consider:

Documentation
Installation
- Download the
.vsix
package or install it directly from the marketplace.
- Make sure
gpg
is installed on your system (gpg --version
). Set the path in the extension settings.
- Import or create a key pair before using the extension.
- Configure the key in the extension settings.
GPG Note
If you are completely new to gpg
:
# Generate a key pair
gpg --gen-key
# List public keys
gpg --list-keys
# List private keys
gpg --list-secret-keys
# Export private key ⚠
gpg --export-secret-keys YOUR_ID > mykey.prk
# Export public key
gpg -a --export [id/name] > outputfile
# Import private key
gpg -a --import key.prk
gpg --edit-key youremail@example.com
>trust, 5, quit
# Import public key
gpg -a --import key.puk
PS: Some graphical tools allow you to perform these operations — feel free to use whichever works best for you.
Usage
Select some text, then run one of the following commands:
- Encrypt selection (
inlineEncrypt.encrypt
)
- Decrypt selection (
inlineEncrypt.decrypt
)
(Optional) Create keyboard shortcuts for these commands.

Settings
You need to configure:
inlineEncrypt.gpgPath
: Path to your gpg
.
inlineEncrypt.keyId
: Default key ID to use for encryption.
Example settings.json
:
{
"inlineEncrypt.gpgPath": "/usr/bin/gpg",
"inlineEncrypt.keyId": "0x158B2252"
}
Versions
See CHANGELOG.md for version history.
License
CC-BY-NC-SA -> https://creativecommons.org/licenses/by-nc-sa/4.0/
ON7AUR - CC-BY-NC-SA ®