How to send an encrypted email

Apr 07, 2025

Email providers claim that your emails are private. But they are not, because email providers themself can read your emails. It means that governments can force them to turn over your emails, or corporations could buy them, which makes them public by default. Today I will show you how to send an actually encrypted email using GPG. This method doesn’t require any special client software, it will work on Outlook, Gmail, Yahoo, etc.

Flow

  1. Sender gets receiver’s public GPG key.
  2. Sender encrypts email with receiver’s public GPG key.
  3. Receiver decrypts email with his private GPG key.

Install GPG

Windows

Install Gpg4win.

Linux

Debian/Ubuntu:

sudo apt install gnupg2

Arch Linux:

sudo pacman -S gnupg

Fedora:

sudo dnf install gnupg2

MacOS

brew install gnupg

Send encrypted email

First, you need to get receiver’s public key file (if he doesn’t have one, send him a link to this guide: https://svoboda.center/blog/how-to-send-an-encrypted-email#generate-your-gpg-key).

This guide assumes that you have a .txt file with email’s content.

Hint: if you generate your GPG key, you can attach it in the email. That way you can exchange encrypted messages back and forth.

Windows

  1. Open Powershell.
  2. Import receiver’s public key: gpg --import receiver-public-key.asc. You can find receiver’s email in output of this command.
  3. Encrypt email’s content: cat C:\path\to\email.txt | gpg --encrypt --armor --recipient receiver_email@gmail.com
  4. Send the output of previous command to receiver. It should start with -----BEGIN PGP MESSAGE----- and end with -----END PGP MESSAGE-----.

Linux

  1. Import receiver’s public key: gpg2 --import receiver-public-key.asc. You can find receiver’s email in output of this command.
  2. Encrypt email’s content: cat /path/to/email.txt | gpg2 --encrypt --armor --recipient receiver_email@gmail.com
  3. Send the output of previous command to receiver. It should start with -----BEGIN PGP MESSAGE----- and end with -----END PGP MESSAGE-----.

MacOS

  1. Open Terminal.
  2. Import receiver’s public key: gpg --import receiver-public-key.asc. You can find receiver’s email in output of this command.
  3. Encrypt email’s content: cat /path/to/email.txt | gpg --encrypt --armor --recipient receiver_email@gmail.com
  4. Send the output of previous command to receiver. It should start with -----BEGIN PGP MESSAGE----- and end with -----END PGP MESSAGE-----.

Decrypt encrypted email

Windows & MacOS

  1. Copy encrypted email’s content to encrypted-email.asc file.
  2. Decrypt email: gpg --decrypt encrypted-email.asc

Linux

  1. Copy encrypted email’s content to encrypted-email.asc file.
  2. Decrypt email: gpg2 --decrypt encrypted-email.asc

Generate your GPG key

First, install GPG.

Windows

  1. Open Powershell.
  2. Generate GPG key: gpg --full-generate-key. Make sure to enter your email when asked.
  3. Export GPG key: gpg --export --armor > my-public-key.asc

Linux

  1. Open Terminal.
  2. Generate GPG key: gpg2 --full-generate-key. Make sure to enter your email when asked.
  3. Export GPG key: gpg2 --export --armor > my-public-key.asc

MacOS

  1. Open Terminal.
  2. Generate GPG key: gpg --full-generate-key. Make sure to enter your email when asked.
  3. Export GPG key: gpg --export --armor > my-public-key.asc

Send me an encrypted email

My email: svobodacenter@mailum.com

My public GPG key: Key

Send me your darkest secrets. If you attach your public key, I will answer you back with an encrypted email.

If you want to support us, you can donate here: