AES Encrypt / Decrypt

AES-256-GCM encryption with PBKDF2 key derivation. Runs 100% in your browser using the Web Crypto API.

Last reviewed: April 2026

New to this tool? Click here for instructions

Educational use only. For production applications, use a professionally audited encryption library. Never share private keys or passwords via untrusted channels.
Enter a password
Plaintext
Encrypted (Base64)
Enter text and a password, then click Encrypt.

How to Use the AES Encryption Tool

To use the AES Encryption Tool, follow these steps:

1. Choose a direction: "Encrypt" to convert plaintext to Base64-encoded ciphertext, or "Decrypt" to reverse it.

2. Enter a password. The strength indicator shows how secure your password is. Use a mix of upper/lowercase, digits, and symbols for maximum security.

3. Paste your text into the input area.

4. Click Encrypt/Decrypt - the result appears on the right.

5. Copy or download the result. To decrypt later, you need both the Base64 output and the exact same password.

When to Use AES vs. RSA

Use AES when you need to encrypt personal data for your own use or share encrypted messages with someone you can securely share a password with.

Use RSA when you need to exchange data with someone you haven't pre-shared a secret with. RSA is suitable for establishing a shared secret, which can then be used with AES for bulk data encryption.

How It Works

When you click Encrypt, this tool performs the following steps using the browser's native window.crypto.subtle API:

1. Generate a cryptographically random 16-byte salt.

2. Derive a 256-bit AES key from your password using PBKDF2 with HMAC-SHA256, 600,000 iterations, and the salt.

3. Generate a cryptographically random 12-byte IV (nonce).

4. Encrypt the plaintext using AES-256-GCM with the derived key and IV.

5. Concatenate salt + IV + ciphertext and encode as Base64. Decryption extracts the salt and IV from the Base64 payload, re-derives the key from your password, and decrypts. The GCM authentication tag is verified automatically.

Tips, Edge Cases, and Limitations

Password Strength Matters: AES-256 is theoretically unbreakable, but weak passwords are still vulnerable to dictionary attacks even with PBKDF2 stretching. Use a random passphrase of 4+ words or a 20+ character random string.

No Data Sent to Server: This tool runs entirely in your browser and does not send any data to a server. Your data is encrypted locally and never transmitted.

Limitations: This tool is intended for educational purposes. For production applications, use a professionally audited encryption library.

IV (Initialization Vector): The IV is a 12-byte value that is unique for each encryption operation. It is generated randomly and included in the encrypted output.

Security Considerations: Always use strong passwords and avoid sharing them via untrusted channels. Never store private keys or passwords in unsecured locations.

Frequently Asked Questions

AES-256-GCM combines AES with a 256-bit key and GCM (Galois/Counter Mode), which provides both encryption and authentication.
PBKDF2 (Password-Based Key Derivation Function 2) is used to derive a strong encryption key from a password. It uses a hash function (HMAC-SHA256 in this case) and iterates the process multiple times (600,000 iterations) to make brute-force attacks computationally infeasible.
An IV (Initialization Vector) is a unique value used in encryption to ensure that the same plaintext encrypted multiple times will produce different ciphertexts. It is generated randomly and included in the encrypted output.
No, this tool is intended for educational purposes only. For production applications, use a professionally audited encryption library.
The encrypted output is formatted as a Base64-encoded string that includes the salt, IV, and ciphertext.

Quick reference

`AES Encrypt / Decrypt Online - Free Tool | Quick Reference`
Parameter Description Example