Encryption/Decryption

Encrypt and decrypt text with AES-GCM in your browser.

Encrypt text with a passphrase and decrypt it again using AES-256-GCM. The result is a single Base64 string that contains everything needed for decryption except your passphrase. It suits developers who need to protect a snippet, a token or a note quickly and understand exactly how it was protected.

What is AES-GCM with a passphrase?

AES is a symmetric block cipher: the same secret both encrypts and decrypts. GCM is an authenticated mode, so decryption fails if the ciphertext was modified or the key is wrong, rather than returning garbage. Because humans use passphrases rather than random 256-bit keys, the tool derives the key with PBKDF2 using SHA-256 and 210,000 iterations plus a random 16-byte salt, which makes guessing attacks slow. A random 12-byte IV is generated for every encryption, so encrypting the same text twice gives different output. The output is Base64 of: one version byte, salt, IV, then ciphertext with the 16-byte authentication tag. Security still depends on a strong, unique passphrase.

How to use Encryption/Decryption

  1. Enter the input Paste the plain text to encrypt, or the Base64 result to decrypt, in the Text / encrypted Base64 box.
  2. Set the passphrase Type it in the Passphrase field. Tick Show passphrase to reveal what you typed.
  3. Choose an action Press Encrypt to produce Base64, or Decrypt to recover the text. The tool does not run automatically.
  4. Copy the Result Take the output from the Result box.

Frequently asked questions

Which algorithm and parameters are used?

AES-256-GCM with a key derived by PBKDF2 using SHA-256, 210,000 iterations and a random 16-byte salt. A random 12-byte IV is created per encryption. The output is versioned Base64.

Is my passphrase stored or sent anywhere?

No. The key is derived for the operation and is non-extractable. Nothing is saved by the tool, so closing the page discards it.

Can I decrypt this elsewhere?

Yes, if you reimplement the layout: Base64 decode, read the version byte, 16-byte salt and 12-byte IV, then AES-GCM decrypt the rest with a PBKDF2-SHA-256 key of 210,000 iterations.

Is this the same as hashing?

No. Hashing cannot be reversed. Encryption is reversible with the passphrase, which is why losing the passphrase means losing the data.

Why does encrypting twice give different results?

Each encryption uses a fresh random salt and IV. Both are stored inside the output, so every result still decrypts correctly with the same passphrase.