AES Encrypt / Decrypt

AES-GCM is authenticated encryption: ciphertext plus a tag that fails if a bit is flipped. This page runs it in the browser so you can wrap a short secret for a lab or see what GCM output looks like. It is not a backup system and not a substitute for TLS or a password manager.

What the AES encrypt / decrypt tool is for

AES-GCM is authenticated encryption: the ciphertext fails to decrypt if anyone alters a bit. This page derives a 256-bit key from your passphrase with PBKDF2 (210,000 iterations, SHA-256) and a random salt, then encrypts with a random 12-byte IV.

Use it to wrap a short secret you will decrypt later on this same tool — not as a replacement for a password manager or for files you mail around casually.

Common uses

  • Parking a recovery phrase on paper as a ciphertext blob
  • Teaching AES-GCM vs hashing in a workshop
  • Checking that a passphrase actually decrypts what you just encrypted

What the output means in the real world

You get a nonce (IV), ciphertext, and authentication tag, usually bundled as one blob. Keep the key in a secret manager, never beside the ciphertext in the same email or ticket. Never commit the key, never Slack it, never paste it into a repo. If the key leaked, rotate it and treat every message it sealed as exposed. Decrypt only on a machine you trust; close the tab when finished.

How this fits into real work

NIST SP 800-38D specifies GCM. Reusing a nonce with the same key is a catastrophic failure: it can leak the authentication key. This page must mint a fresh nonce per encrypt. If you copy a protocol that reuses IVs, stop.

AES-CBC without a MAC is still in old tutorials. Bit-flip attacks on CBC padding are textbook. Prefer GCM or another AEAD. Do not 'roll your own' by concatenating AES and SHA.

Browser SubtleCrypto is fine for a local wrap. Production systems should use a KMS so keys never sit in app memory on a laptop. If you encrypted a real staff secret here, move it into a vault and delete the page output.

How to use this tool

  1. Choose Encrypt. Enter the plaintext and a long passphrase you will remember or store elsewhere.
  2. Copy the Base64 blob. It contains salt, IV and ciphertext. Losing any part of it loses the plaintext.
  3. To reverse, choose Decrypt, paste the same blob, and enter the same passphrase.
  4. If decryption fails, the passphrase is wrong or the blob was truncated. There is no recovery.

Tips

  • The passphrase is not the AES key. PBKDF2 stretches it. A four-letter passphrase still loses.
  • Do not reuse this blob format with other tools — they will not parse salt+IV the same way.
  • For production systems, use a proper KMS or a password manager, not a browser tab.

Privacy & how it works

Everything happens inside your browser. The values you type are held in page memory only, are never sent to a server, and disappear when you close the tab. You can confirm this in your browser's network tab: the only request a tool makes is one that names the tool for a usage count, with nothing you typed in it. The tools also work with the internet disconnected. Randomness comes from crypto.getRandomValues(), the browser's cryptographically secure generator, not Math.random(). Math.random() is seeded predictably and must never be used for anything security-related, because an attacker who learns part of the sequence can reconstruct the rest.

Frequently asked questions

Can you recover my plaintext if I forget the passphrase?
No. Nothing is stored. AES-GCM without the key is designed to be infeasible to reverse.
Is this the same as HTTPS?
No. TLS protects data in transit to a server. This encrypts a string you keep. Different job.

Browse other tools

All tools run entirely in your browser — nothing you type is sent to a server, except the optional HIBP 5-character hash prefix.