piapia123
en

AES / DES / 3DES Encryption and Decryption

Encoding

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Symmetric encryption of text. AES is the only choice worth making today, and the browser implements it natively through Web Crypto with hardware acceleration. DES has a 56-bit key that purpose-built machines were exhausting in days back in 1998; it survives only for reading old data. 3DES patches that by encrypting three times, lifting the effective strength to 112 bits, and is likewise only for talking to systems that cannot be changed. Mode selection causes more mistakes than algorithm choice: CBC is the long-standing default and needs a 16-byte IV, GCM adds integrity checking so a single flipped ciphertext byte is detected (CBC cannot do this), CTR turns the block cipher into a stream and needs no padding, and ECB encrypts identical plaintext blocks into identical ciphertext blocks, leaking patterns outright — it is kept here purely for legacy interop, and AES refuses it outright. Everything runs locally; neither key nor plaintext leaves the browser.

Features

  • Three algorithms: AES (128 / 192 / 256-bit), DES and 3DES
  • Four modes: CBC, GCM, CTR and ECB, each labelled with where it fits
  • Keys and IVs as text, hex or Base64 — hex tolerates spaces, colons and a 0x prefix
  • AES runs on the browser-native Web Crypto API (hardware accelerated); DES and 3DES are implemented here
  • GCM authentication tags are appended to the ciphertext, matching the output format of other tools
  • A wrong length reports both what you gave and what is required, rather than a bare "invalid key"

How to use

  1. Choose the direction: encrypt or decrypt
  2. Choose the algorithm and mode (AES with CBC or GCM for anything new)
  3. Fill in the key and IV, switching their format if needed
  4. Paste your content, press Ctrl/⌘ + Enter or click Run, then copy the result

FAQ

How do I choose between CBC, GCM, CTR and ECB?
Use GCM for anything new (with AES): besides confidentiality it verifies integrity, so a single altered ciphertext byte makes decryption fail — whereas CBC does not, and will happily "succeed" on tampered data while returning garbage. When talking to older systems you usually have to use CBC, the decades-old default that nearly every library supports. CTR treats the block cipher as a stream cipher and needs no padding, which suits data of unpredictable length. Do not use ECB: it maps identical plaintext blocks to identical ciphertext blocks, so encrypting a bitmap reveals the original outline — the classic ECB penguin illustrates this perfectly.
What is an IV, and can it stay fixed?
The IV makes the same plaintext encrypt to different ciphertext each time under one key. It need not be secret in CBC or CTR, but it must never be reused: under CBC a repeated IV lets an attacker see whether two plaintexts are identical, and under CTR or GCM it is worse — XORing two ciphertexts cancels the keystream and exposes the plaintext outright. Generate a fresh random IV per encryption and store it alongside the ciphertext, which needs no protection itself. ECB has no IV, which is one of the reasons it is unsafe.
Why is there no ECB mode for AES?
Because the browser-native interface (Web Crypto) does not provide one. That is deliberate rather than an oversight: the specification excludes the mode precisely because of the pattern leakage described above. If a legacy system you must talk to accepts only AES-ECB, this tool cannot help; ECB is available for DES and 3DES, where it is more common in older systems anyway.
How long should the key be? Why do I keep getting length errors?
The length is fixed by the algorithm with no room to negotiate: AES takes 16, 24 or 32 bytes (128, 192 or 256 bits), DES exactly 8, and 3DES exactly 24. Note that two hex characters make one byte — 32 hex characters give you 16 bytes (AES-128), not 32. The same applies to the IV: 16 bytes for AES-CBC, 12 for AES-GCM, 8 for DES and 3DES.
What happens if the key is wrong?
Except for GCM, nothing reports an error — the other modes will "successfully" decrypt into random bytes, and this tool then fails while decoding them as UTF-8, telling you the key or IV is probably wrong. That is inherent to symmetric encryption: the ciphertext carries no check value, so the decrypting side cannot tell whether the result is right. GCM detects a wrong key immediately thanks to its authentication tag, which is one more reason to prefer it: not just tamper detection, but finding out sooner that you mistyped the key.

Related tools