AES Encrypt / Decrypt
Encrypt and decrypt with AES-GCM or AES-CBC using a password or raw key.
- Input and output stay in memory and are gone when you leave this page.
Nothing saved
Input and output stay in memory and are gone when you leave this page. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Key
Plaintext
Ciphertext
What this tool does
AES Encrypt / Decrypt (T24) encrypts and decrypts text in your browser using Web Crypto (crypto.subtle) with AES-GCM (authenticated encryption with a fresh 12-byte IV) or AES-CBC (unauthenticated block chaining with a fresh 16-byte IV). Keys can be derived from a password via PBKDF2-HMAC-SHA256 (600,000 iterations in hash.worker.ts) or entered directly as raw 128-, 192-, or 256-bit hexadecimal.
Nothing on this page is saved. Closing or reloading the tab discards it permanently.
Envelope format and modes
By default, output is a self-describing 5-field URL-safe Base64 envelope so every encryption carries its own fresh random salt and IV (FR-CRY-8):
DevStash-AES-1.<mode>.<base64url salt>.<base64url iv>.<base64url ciphertext>
| Mode | IV | Authentication |
|---|---|---|
AES-GCM | 12 bytes (24 hex chars), fresh per operation | Built in. A modified ciphertext fails to decrypt. |
AES-CBC | 16 bytes (32 hex chars), fresh per operation | None. AES-CBC does not authenticate. A modified ciphertext decrypts without any error, producing plaintext an attacker chose. Use AES-GCM unless something else requires CBC. |
Supported formats and options
- Key source:
Password(derives a 32-byte key with a fresh 16-byte random salt using 600,000 iterations of PBKDF2-HMAC-SHA256) orRaw hex(accepts 32, 48, or 64 hex characters for AES-128, AES-192, or AES-256). - Output format:
Envelope(recommended; bundles mode, salt, IV, and ciphertext) orRaw ciphertext + IV(emits standard Base64 ciphertext and hexadecimal IV separately for interoperating with external tools).
Examples and reference vector
Encrypting hello with password pw under AES-GCM produces:
DevStash-AES-1.gcm.<base64 salt>.<base64 iv>.<base64 ciphertext>
Running the encryption a second time with the same plaintext and password produces a different envelope string because both the 16-byte PBKDF2 salt and the 12-byte GCM IV are drawn fresh from randomBytes.
Limits and non-goals
32 MB. No streaming, so no whole-disk or large-archive encryption. The envelope format is this tool's own and no other software reads it; raw mode exists for that case. No key wrapping, no RSA-OAEP hybrid encryption, no PGP.
- Error reference:
This tool needs the Web Crypto API, which browsers expose only over HTTPS or on localhost. This page is served over plain HTTP, so the operation cannot run here.Decryption failed. The password is wrong, the ciphertext was modified, or it was not produced by this tool.That is not a DevStash AES envelope. Switch to raw mode and supply the IV separately.A raw key must be 32, 48, or 64 hex characters โ 128, 192, or 256 bits. This one has 10.The IV must be 24 hex characters for AES-GCM.Input is larger than 32 MB. Web Crypto has no streaming AES, so this tool cannot encrypt a file that size.
Related tools
- PBKDF2 Key Derivation (T28): derive standalone hex and Base64 keys from a password and salt.
- HMAC Generator (T22): authenticate messages with a shared secret key.
- Key Pair Generator (T25): generate asymmetric RSA, ECDSA, and Ed25519 key pairs.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.