AES Encryption Tool
Encrypt text with AES-128, 192, or 256-bit keys — 100% client-side
How to Use the AES Encryption Tool
- Enter the text you want to encrypt.
- Enter a secret key (password). Use a strong, unique key.
- Choose key size: 128, 192, or 256-bit (256 recommended).
- Click Encrypt. Copy the output ciphertext.
- To decrypt, use the AES Decryption tool with the same key.
What is AES?
AES (Advanced Encryption Standard) is a symmetric block cipher — the same key encrypts and decrypts. It is the most widely used encryption algorithm, adopted by the US government and used in TLS, WPA2, and most secure applications.
Security note: This build offers CBC, ECB, CTR, OFB, and CFB with PKCS7 padding. It does not provide AES-GCM. ECB leaks repeated blocks. For a real deployment, prefer an authenticated mode in a reviewed library, and do not reuse an IV with the same key.
What is AES Encryption?
AES (Advanced Encryption Standard) is the most widely used symmetric encryption algorithm in the world. Standardised by NIST in 2001, it supports 128, 192, and 256-bit keys. AES is used in TLS/HTTPS, file encryption, VPNs, and virtually every modern security system.
Common Uses
- Encrypting sensitive data before storing in a database
- Encrypting files and text for secure transmission
- Environment variable and secrets encryption in applications
- End-to-end encrypted messaging systems
Frequently Asked Questions
What is the difference between AES-128, AES-192, and AES-256?
The numbers refer to the key length in bits. AES-256 uses a longer key and is theoretically more secure, but AES-128 has never been broken in practice and is faster. For most applications, AES-128 or AES-256 are both fine.
What is CBC mode vs other AES modes?
CBC (Cipher Block Chaining) XORs each plaintext block with the previous ciphertext block before encrypting, requiring an IV (Initialisation Vector). GCM mode additionally provides authentication, detecting if ciphertext was tampered with. Prefer AES-GCM for new systems.
Is it safe to encrypt data in the browser?
Aya Corporation uses the browser's Web Crypto API for AES operations — the same cryptographic library used by HTTPS. The key and plaintext never leave your browser.
Notes from this implementation
What this script actually does
The encrypt button calls CryptoJS AES.encrypt with the mode you pick: CBC, ECB, CTR, OFB, or CFB. Padding is PKCS7. Key size is a label in the form (128, 192, or 256). The passphrase is turned into a CryptoJS word array; it is not run through a password-based key derivation function such as PBKDF2. That means a short password is a short key, not a stretched one.
An earlier line on this page said the tool used AES-GCM with a random IV. That description was wrong for this file. There is no GCM option, and the IV field is whatever you type. If you leave the IV predictable and reuse it with the same key in CTR or CBC, later ciphertext can be compared against earlier ciphertext.
A check you can repeat
Encrypt the single word ping with key example-key, mode CBC, and a 16-byte IV you write down. Decrypt on the AES decryption page with those same three values. If the mode or IV differs, PKCS7 padding fails and you get an empty or garbled string, not a friendly “wrong password” error.
When not to use the output
ECB repeats: two identical plaintext blocks become two identical ciphertext blocks, which is enough to see structure in images and aligned records. None of these modes add an authentication tag. A person who can edit the ciphertext can often flip bits in CBC without the page noticing. For files or tokens you will store, use an authenticated mode in a library you can pin, and treat this page as a way to learn the modes.