Privacy and Security

How to Encrypt a File Before You Email or Upload It

Why sending files unencrypted is risky, how password and public-key file encryption work, and how to share encrypted files safely with anyone.

Saizul Amin
Saizul Amin2 Nov 2026 · 4 min read
How to Encrypt a File Before You Email or Upload It

How to Encrypt a File Before You Email or Upload It

Every day people email passport scans, tax returns, medical letters and contracts as ordinary attachments. Those files sit in mail servers, backups and synced phones for years, and a single compromised account exposes all of them. Encrypting a file before it leaves your device fixes most of that risk, and it no longer requires special software. The File Encryption Tool does it in your browser. This guide explains how it works and how to use it well.

What encryption actually protects

Encryption turns a file into data that is useless without the right key. If someone gets hold of the encrypted file, through a hacked mailbox, a leaked cloud folder or a lost USB stick, they see only random bytes. Modern authenticated encryption such as AES-GCM also detects tampering: a changed or truncated file is rejected rather than silently corrupted.

What it does not hide: the fact that you sent a file, roughly how big it is and who you sent it to. And it cannot protect a file on a device infected with malware, which can read it before encryption.

Option 1: a password

The simplest approach is a password. The tool stretches it into a 256-bit key with PBKDF2, repeating a hash function 600,000 times, the level OWASP recommended in 2023. This makes each guess slow for an attacker. Even so, the password is the weak point:

  • Short passwords can be guessed offline, because the attacker can try candidates against the file as fast as their hardware allows.
  • A passphrase of four or five random words, such as "lantern-copper-violet-hurdle-mint", is both strong and easy to type.
  • Never send the password in the same channel as the file. Email the file and send the password by text message or tell it over the phone.

Option 2: public-key encryption

Passwords have to be shared, and sharing secrets is the hard part of security. Public-key cryptography removes that step. Each person creates a key pair: a public key they can give to anyone, and a private key they keep.

When someone encrypts a file for you with your public key, the tool generates a one-time key pair, combines it with your public key using elliptic-curve Diffie-Hellman (ECDH on the P-256 curve) and derives the file key with HKDF. Only your private key can recreate that file key. No password ever travels between you.

To set it up:

  1. Create your key pair in the Public keys tab.
  2. Export your public key and send it to the people who send you documents, for example your accountant.
  3. Confirm the short key ID with them by phone, so nobody can slip in a fake key.
  4. Back up your private key file somewhere safe and offline.

Large files and integrity

The tool encrypts in 1 MB chunks. Each chunk has its own authentication tag and is bound to its position and to the file header, so a missing, reordered or truncated chunk is detected. This lets you encrypt videos and archives of several gigabytes without loading everything at once while reading.

A practical routine

  • For a one-off exchange with someone who does not use keys: password-encrypt, send the file by email, phone them the passphrase.
  • For regular exchanges, such as with a family member or a client: swap public keys once, then encrypt for each other with no passwords.
  • For backups on cloud storage or USB drives: encrypt with a long passphrase stored in your password manager.

Mistakes to avoid

  • Losing the password or private key. There is no recovery, by design.
  • Reusing an old, leaked password as the file password.
  • Leaving the unencrypted original in a synced folder next to the encrypted copy.
  • Forgetting that the outer file name is visible; name it something neutral.

Summary

Encrypt files before they leave your device, choose a long passphrase or public keys, and send passwords by a separate channel. The file encryption tool handles the cryptography in your browser, with nothing uploaded, so the only things you need to manage are the password or key and where you send the file.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages