Text Encrypt / Decrypt

AES, DES, TripleDES, or RSA.

Share
Type

About the Encrypt or Decrypt Text

This tool encrypts and decrypts text in your browser using either a shared passphrase (AES, DES, or TripleDES) or an RSA key pair. It is built for the everyday case where you need to move a short piece of sensitive text - a credential, a note, a recovery phrase - through a channel you do not fully trust, and you want to be able to check the result yourself.

The key or passphrase never leaves your device. There is no upload step and no server-side processing, which is the property that makes a browser-based crypto tool defensible at all.

How to use this tool

  1. Choose an algorithm. AES is the right default for a shared passphrase; RSA is for when the sender and recipient hold different keys.
  2. Switch between Encryption and Decryption.
  3. For symmetric algorithms, enter the passphrase both sides will use. For RSA, paste the public key to encrypt or the private key to decrypt.
  4. Paste your text into the input box and read the result from the output box.
  5. Send the recipient the ciphertext - and share the passphrase over a different channel than the ciphertext itself.

Symmetric versus asymmetric, briefly

Symmetric encryption uses one secret for both directions. AES, DES, and TripleDES all work this way. It is fast and simple, and the entire difficulty is logistical: both parties need the same passphrase, and getting it to them safely is a problem encryption itself does not solve.

Asymmetric encryption splits the secret into a public key that encrypts and a private key that decrypts. Anyone can hold your public key and send you something only you can read, which removes the key-distribution problem. The costs are speed and payload size - RSA can only encrypt a message shorter than its key, which is why real systems use RSA to protect an AES key and then use AES for the actual data.

Use AES; do not use DES

DES and TripleDES are offered here because you will occasionally need to decrypt something old that used them. Do not choose them for anything new. DES has a 56-bit key and has been brute-forcible with modest hardware since the late 1990s. TripleDES is stronger but slow, has a small block size that causes practical problems on large data, and was formally deprecated by NIST for new applications.

AES is the current standard, is hardware-accelerated on every modern CPU, and has no practical break. If you have a choice, it is the choice.

Where a browser tool is and is not appropriate

This tool is well suited to one-off, human-scale tasks: sending a colleague a password, storing an encrypted note, checking what a piece of ciphertext decrypts to, or learning how these algorithms behave.

It is not a substitute for purpose-built infrastructure. For secrets your applications consume, use a secrets manager. For encrypted messaging, use a tool with forward secrecy and verified identities. For files at rest, use full-disk or filesystem encryption. And your passphrase is the whole of your security here - a short or guessable one makes strong ciphertext worthless, because an attacker will attack the passphrase rather than the algorithm.

Frequently asked questions

Can you recover my text if I lose the passphrase?
No, and neither can anyone else. We never see your passphrase or your text, so there is nothing on our side to recover from. That is the design working correctly, but it does mean a lost passphrase is a permanent loss.
Why does the same input produce different ciphertext each time?
The symmetric modes derive a random salt and initialisation vector per run and embed them in the output. That is deliberate and desirable - it stops an observer from spotting that you encrypted the same message twice. Any of those outputs will decrypt back to the original with the same passphrase.
My RSA text will not encrypt - why?
Almost always length. RSA can only encrypt data smaller than its modulus minus padding overhead, so a 2048-bit key tops out around 190 bytes. Encrypt a short passphrase with RSA and use that passphrase with AES for the body of your message.
Where do I get an RSA key pair?
Our PEM file generator produces a matching 2048-bit private and public key in your browser. Keep the private key to yourself and hand out only the public one.