AES Encrypt / Decrypt

Encrypt or decrypt with configurable AES modes, raw keys or passphrases, and Hex, Base64 or JSON ciphertext.

Security & Cryptography
Preparing your workspace…

Input

Preparing your workspace…

Output
Your result will appear here.

How to use

  1. Choose Encrypt or Decrypt, a ciphertext format and matching AES settings.
  2. Enter the text or bytes, secret and any required IV, salt or authentication parameters.
  3. Run the action, inspect the result and keep the matching parameters for later decryption.

AES Encrypt / Decrypt

This AES workbench supports common debugging and interoperability tasks: choose the mode, key size, secret source, encodings, IV and mode-specific parameters. GCM is the default authenticated mode; compatibility modes do not provide the same tamper detection.

Use raw ciphertext with matching key and IV parameters from another implementation, or keep the non-secret parameters in a DevToolsy JSON envelope. Input keys and passphrases are not included in the export.

Match the encryption parameters

A raw AES key must contain exactly 16, 24 or 32 bytes. UTF-8, Hex and Base64 are explicit byte encodings; the tool never pads or truncates a key. In passphrase mode, PBKDF2 derives only the key; IV handling is separate.

Encryption generates a fresh IV and salt by default. For interoperability, select manual values and match every setting. GCM uses a 12–64 byte IV here, with 12 bytes recommended; CBC, CTR and CFB require exactly 16 bytes, while ECB has no IV.

Example
Input
Plaintext: Hello, encrypted world! 🌐
Passphrase: DevToolsy-demo-passphrase
Result
{
  "format": "devtoolsy-aes",
  "version": 2,
  "mode": "GCM",
  "keyBits": 256,
  "keySource": "passphrase",
  "padding": "none",
  "iv": "EBESExQVFhcYGRob",
  "ciphertext": "QdSMophe/cqRY/7qS1tHMemEKsgTwgzhEdCmOixECYc6+/X/mfq9f9Wq0CE=",
  "kdf": {
    "name": "PBKDF2",
    "hash": "SHA-256",
    "iterations": 600000,
    "salt": "AAECAwQFBgcICQoLDA0ODw=="
  },
  "authentication": {
    "tagLength": 128,
    "aad": ""
  }
}

Example data only. Never reuse sample secrets as real credentials.

Mode-specific behavior

GCM supports 96–128-bit authentication tags, appended or separate raw tags, and AAD. AAD is authenticated but not encrypted and is included in a JSON envelope. Wrong authentication data or a modified ciphertext fails without returning partial plaintext.

CBC and ECB support PKCS#7 or no padding; unpadded inputs must contain complete 16-byte blocks. CFB uses 128-bit feedback segments. CTR supports a 1–128-bit counter field. CBC, CTR, CFB and ECB do not authenticate the output; decryption can return bytes with a wrong key.

Binary results can be displayed as Hex or Base64, or downloaded as raw bytes. Invalid UTF-8 is reported instead of being silently replaced. A 1 MiB plaintext limit and Worker timeout apply.

Keep the ciphertext and required parameters

Raw ciphertext does not describe its mode, key, IV, salt or padding. Keep those parameters separately. DevToolsy JSON v2 stores non-secret parameters and accepts v1 GCM envelopes for existing data. JSON is a container, not an authentication mechanism; check the mode shown before decrypting.

Use result as input carries the actual parameters into decryption. Switching back to encryption restores fresh random IV/salt defaults. No passwords or keys are written to the URL, local storage or automatic request history.

Processing limits

Input: 1 MiB; Secret key: 64 KiB; File: 1 GiB; Passwords: 4–128 (Length), 1–100 (Count); bcrypt: 1–72 UTF-8 bytes · cost 4–14 · default 10; AES: Plaintext 1 MiB, Passphrase 1 KiB, GCM / CBC / CTR / CFB / ECB, 128/192/256-bit; PBKDF2 / HKDF: Password / input bytes 64 KiB, Salt / info 1 KiB, Output length (bytes) 1–256; 1–256 output bytes · up to 2,000,000 PBKDF2 iterations · inputs stay on your device; Time: 30 s; File: 120 s.

?

Frequently asked questions

Which mode should I choose?

Use GCM when you need authenticated encryption. CBC, CTR and CFB are compatibility options without built-in authentication. ECB also reveals repeated blocks and is intended only for legacy debugging.

Can I use ciphertext from Node.js, Python or OpenSSL?

Raw key mode can interoperate when mode, key bytes, IV, padding, encoding and GCM tag/AAD settings all match. OpenSSL Salted__ or CryptoJS passphrase wrappers are not automatically parsed; use their actual derived key and IV, not the wrapper as raw ciphertext.

What do I need to decrypt later?

Keep the original key or passphrase and all matching non-secret parameters. JSON v2 carries those parameters; raw ciphertext requires them separately. DevToolsy cannot recover a lost secret.

Can I still decrypt the old JSON format?

Yes. DevToolsy v1 envelopes retain their original AES-256-GCM, PBKDF2-SHA256, 600,000-iteration and 128-bit tag settings. The workspace reads those values automatically.

Why does a wrong key sometimes produce output?

GCM verifies its authentication tag. CBC, CTR, CFB and ECB do not authenticate the message; a completed operation does not prove that the key or plaintext is correct.

Are secrets uploaded or included in exports?

The calculation stays in your browser Worker. Input keys and passphrases are not automatically exported or persisted. AAD and other public parameters are included in JSON, so do not put secrets into AAD.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.