Encrypt and decrypt small text snippets locally

AES-256-GCM in the browser.

Create a portable encrypted JSON envelope with local browser crypto and a passphrase. Pure browser; no login.

Encrypting a short text with a passphrase

Sometimes you need to send a password, a recovery code or a private note through a channel you do not fully trust: a shared document, a ticket, a chat with history. Encrypting it with a passphrase means the message is useless to anyone who sees it but does not know the passphrase.

This tool encrypts text in your browser with AES-256-GCM, the same algorithm used by HTTPS and disk encryption, and wraps the result in a portable envelope: a single block of text you can paste anywhere. Paste the envelope back with the same passphrase to decrypt it.

How to use it

  1. Type or paste the plain text.
  2. Choose a strong passphrase, ideally four or more random words.
  3. Copy the envelope and send it through one channel.
  4. Share the passphrase through a different channel, such as a phone call; the recipient pastes the envelope and passphrase here to read the text.

Example: what an envelope contains

Input
meet at 9 / passphrase: correct horse battery staple
Output
{"v":2,"alg":"AES-256-GCM","kdf":"PBKDF2-SHA256-600k","salt":"…","iv":"…","ct":"…"}

The envelope is this JSON, Base64-encoded. Salt and IV are random every time, so encrypting the same text twice gives two different envelopes.

How it works

A passphrase is not a key, so the tool first derives a 256-bit key from it with PBKDF2-SHA256, using a random 16-byte salt and 600,000 iterations, the count OWASP recommends. The many iterations make each passphrase guess slow for an attacker. The text is then encrypted with AES-256-GCM and a random 12-byte nonce. GCM is authenticated encryption: if a single character of the envelope is changed, decryption fails instead of producing altered text.

Everything runs through the browser's built-in WebCrypto API. Nothing is sent to a server, so not even this site ever sees your text or passphrase.

The passphrase is the weak point

AES-256 cannot be broken by brute force, but a short or common passphrase can be guessed. Use a passphrase that is long and random: four to six random words, or a generated password from a password manager. Never send the passphrase in the same message as the envelope, and agree on it by voice or in person when the content really matters.

There is no recovery. If the passphrase is lost, the text is gone for good.

When to use something else

For ongoing private conversations, an end-to-end encrypted messenger such as Signal is simpler and protects metadata too. For files and email, use tools built for them, such as age, GnuPG or your password manager's secure sharing. This tool is for the quick case: a short secret that has to travel through an ordinary channel once.

Questions

Can older envelopes still be opened?

Yes. Envelopes made before the iteration count was raised name their own key-derivation settings, and the tool reads them correctly.

Is it safe to use this online?

The encryption runs entirely in your browser and the page makes no network requests with your data. For the highest assurance, load the page, disconnect from the internet, then encrypt.

Can I encrypt files?

This tool is meant for short text. Files are better handled by dedicated tools such as age or 7-Zip with AES encryption.