Free tool · for developers · runs in your browser
AES encryption and decryption online
Check that your Java, Node or Python AES code gives the right answer. Enter the key and IV as plain text, Base64 or Hex, pick the mode, padding and key size, and encrypt or decrypt side by side. Results match javax.crypto, Node’s createCipheriv and PyCryptodome byte for byte, and the tool shows the same settings as code. Everything runs in your browser; keys are never uploaded.
How to use the tool
- 1
Enter your key
Type or paste the secret key and pick its format: Plain Text, Base64 or Hex. The byte counter turns green when it fits the key size, or press Generate.
- 2
Match your code’s settings
Choose the cipher mode, padding and key size your code uses, like AES/CBC/PKCS5Padding with a 256-bit key, and add the IV.
- 3
Encrypt or decrypt
Encrypt plain text to Base64 or Hex on the left, or paste ciphertext on the right and decrypt it to text, Base64 or Hex.
- 4
Compare with your program
Copy the result and compare it with your program’s output. Open “Same thing in code” for a Java, Node or Python snippet with the same settings.
QRScanKaro
Just need to lock a message?
Text Encryption is simpler: pick a password and share the result. No keys, IVs or modes to set.
Encrypt with a password →Frequently asked questions
Why does my Java output differ from this tool?
Almost always one setting differs. Check that the key and IV are read the same way (a hex string passed to getBytes() is treated as text, not bytes), that the IV is the same, and that Cipher.getInstance("AES") alone means AES/ECB/PKCS5Padding in Java, not CBC. Also make sure both sides encode the text as UTF-8.
What is the difference between PKCS5 and PKCS7 padding?
For AES there is none. PKCS7 pads the last block with N bytes of value N; PKCS5 is the same rule defined for 8-byte blocks, and Java simply keeps the older name. So Java’s PKCS5Padding, Node’s default padding and PyCryptodome’s pad() all give identical output.
What IV should I use?
A new random IV for every message: 16 bytes for CBC, CTR, CFB and OFB, and 12 bytes for GCM. The IV isn’t secret, so send it along with the ciphertext, often in front of it. Leaving it empty here uses all zeros so you can match other sites, but a fixed IV is unsafe in real use.
Is ECB mode safe?
No. ECB encrypts each 16-byte block on its own, so identical blocks give identical output and patterns in the data show through. It has no IV either. Use it only to match an old system, and pick GCM for anything new.
Is my key sent anywhere?
No. The AES code runs in JavaScript in your browser, and your key, IV and text never leave this page. Nothing is logged or stored. Still, avoid pasting production keys into any website; use test keys to check your code.
More free tools
Text Encryption & Decryption
Lock any message with a password using AES-256-GCM, then share it on WhatsApp or email.
RSA Encryption & Decryption
Generate RSA key pairs (2048 or 4096-bit PEM), encrypt text with a public key and decrypt with the private key.
Hash Generator
Get MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or a file as you type.
Base64, URL & Hex Encoder
Encode and decode Base64, URL, hex, binary, HTML entities and \u escapes as you type.