AES Encryption
Encrypt and decrypt text with AES-GCM in your browser — PBKDF2 key derivation, a fresh random salt and IV every time, one portable base64 bundle.
This tool wraps the browser’s own Web Crypto implementation of AES-GCM, with every parameter stated on the page and nothing hidden: mode AES-GCM, key derived by PBKDF2-SHA-256 at 100,000 iterations, a random 16-byte salt and a random 12-byte IV generated fresh for every encryption, the password read as UTF-8 text, and the output packaged as the base64 of salt ‖ IV ‖ ciphertext. The packaging helpers are plain and testable: the word “hello” as bytes base64-encodes to aGVsbG8=, and the bytes [0, 15, 255] write out in hex as 000fff. Because the salt and IV are random, encrypting the same text twice with the same password produces two completely different bundles — that is expected, and it is what stops an observer from telling that two messages are identical.
Parameters, stated in full: the cipher is AES-GCM; the 256-bit key is derived from your password with PBKDF2-SHA-256, 100,000 iterations; every encryption generates a fresh random 16-byte salt and a fresh random 12-byte IV; the output is the base64 of salt ‖ IV ‖ ciphertext (the GCM authentication tag is the last 16 bytes of the ciphertext part). Your password and your text never leave this device, are never stored, and are cleared from page memory when you close the page.
Quick answers
How do I encrypt text with AES online?
Enter a password, paste the text, and press Encrypt: the tool derives a 256-bit key with PBKDF2-SHA-256 (100,000 iterations), encrypts with AES-GCM under a fresh random salt and IV, and returns one base64 bundle of salt ‖ IV ‖ ciphertext.
Decrypt by pasting the bundle back with the same password. A wrong password fails cleanly because GCM is authenticated — no garbled plaintext is ever shown.
What are the exact AES parameters used here?
AES-GCM with a 256-bit key; PBKDF2-SHA-256, 100,000 iterations; a random 16-byte salt and 12-byte IV per encryption; password as UTF-8; output is base64 of salt ‖ IV ‖ ciphertext (tag included as the last 16 ciphertext bytes).
The parameters travel with the design, not the data: the bundle itself carries only salt, IV and ciphertext, so keep this page’s settings in mind when decrypting elsewhere.
How to use
- Enter a password — the 256-bit key is derived from it with PBKDF2-SHA-256 and 100,000 iterations, so a long, unique password matters more here than anywhere.
- Type or paste the text to encrypt and press Encrypt. The output is a single base64 bundle: a fresh random 16-byte salt, a fresh random 12-byte IV, then the ciphertext.
- Copy the whole bundle to wherever the encrypted text needs to go — it is safe to store or send, because it is useless without the password.
- To decrypt, paste the bundle back, enter the same password and press Decrypt. A wrong password fails completely (AES-GCM authentication), rather than returning garbled text.
About this tool
Two properties of this design are worth understanding before you rely on it. First, AES-GCM is authenticated: the last 16 bytes of the ciphertext are a tag that covers the whole message, so a changed bundle or a wrong password produces a clean failure, never a quietly corrupted plaintext — if decryption fails here, the answer really is “wrong password or damaged bundle”. Second, the password is the whole security story. PBKDF2 at 100,000 iterations makes each guess expensive, but it cannot rescue a short or reused password against a determined attacker with the bundle in hand. Use a long passphrase you do not use anywhere else. For data at rest in a real system you would also rotate keys and manage them separately; this page is the honest, self-contained version of the same primitives for text you need to protect right now. Your password and text never leave your device.
Frequently asked questions
What exactly does the base64 bundle contain?
Three things stuck together, in order: the 16-byte random salt used for PBKDF2, the 12-byte random IV (nonce) used for AES-GCM, and the ciphertext itself, whose final 16 bytes are the GCM authentication tag. Anyone with the bundle and the password can decrypt; anyone with only the bundle cannot — the salt and IV are not secret, the password is.
Why is the output different every time I encrypt the same text?
Because a fresh random salt and IV are generated for every encryption. A new salt means a different derived key, and a new IV means a different keystream, so identical plaintexts produce unrelated bundles. If two bundles ever did come out identical, that would be a bug worth reporting, not a feature.
What happens if I enter the wrong password?
Decryption fails outright. AES-GCM verifies its authentication tag before releasing any plaintext, so a wrong password (or a bundle that was edited, truncated or corrupted in transit) gives you the failure message and nothing else — there is no partial or garbled output to misread.
Is my password or text sent to a server?
No. The encryption runs in this page with the Web Crypto API built into your browser; the password and text stay in page memory on your device, are never stored, never written into the page address, and are gone when you close the page.
First time embedding? Read the step-by-step guide →
More free tools
UUID Generator
Generate random v4 UUIDs in bulk.
JSON Formatter & Validator
Format, minify and validate JSON in one click.
What Is My IP
See your public IP address instantly. No sign-up, nothing stored.
Regex Tester
Test, check and validate regular expressions with live highlighting.
JWT Decoder
Decode a JWT token without the secret — see its header and payload.
SHA-256 Hash Generator
Generate SHA-256 / SHA-512 hashes instantly.