# AES encryption

> AES-GCM encrypt and decrypt in the browser, nothing uploaded.

Free AES encryption playground. Encrypt text with AES-256-GCM: the key is derived from your passphrase with PBKDF2-SHA256, and a fresh random salt and IV are generated every time. Decrypt a bundle back to plaintext. Everything runs locally with WebCrypto.

- Page: https://benchline.fabwaseem.com/t/aes-crypto
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: Plaintext or a base64 bundle, a passphrase, and a PBKDF2 iteration count.
- Output: A base64 bundle (version, iterations, salt, IV, ciphertext) or the decrypted plaintext.
- Keywords: aes encryption, aes gcm online, encrypt text, aes decrypt, pbkdf2
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Encrypt.** Type the plaintext and a passphrase, pick the PBKDF2 iterations, and press Encrypt. Copy the base64 bundle.
2. **Decrypt.** Switch to Decrypt, paste the bundle and the same passphrase, and press Decrypt.
3. **Keep the passphrase.** There is no recovery. Without the exact passphrase the bundle cannot be opened.

## Use it from an AI agent

MCP tool name: `aes_crypt`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/aes-crypto with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

AES-256-GCM encryption with PBKDF2-SHA256 key derivation. Encrypt returns a base64 bundle (salt, IV, ciphertext); decrypt reverses it.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "encrypt",
        "decrypt"
      ]
    },
    "passphrase": {
      "type": "string",
      "minLength": 1
    },
    "text": {
      "description": "Plaintext to encrypt (encrypt mode)",
      "type": "string"
    },
    "bundle": {
      "description": "Base64 bundle from a previous encryption (decrypt mode)",
      "type": "string"
    },
    "iterations": {
      "default": 100000,
      "type": "integer",
      "minimum": 10000,
      "maximum": 2000000
    }
  },
  "required": [
    "mode",
    "passphrase",
    "iterations"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "aes_crypt",
    "arguments": {
      "mode": "encrypt",
      "passphrase": "example",
      "iterations": 100000
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### How is the key made from my passphrase?

PBKDF2 with SHA-256 stretches your passphrase into a 256-bit key. More iterations means slower brute force; 100,000 is the default and the minimum is 10,000.

### What is inside the bundle?

Base64 of a small JSON object: a version, the iteration count, the random salt, the random IV, and the ciphertext. The passphrase itself is never stored.

### Is my text sent anywhere?

No. Encryption and decryption run in this page with WebCrypto. The bundle only leaves if you copy it.

### Why did decryption fail?

Either the passphrase is wrong or the bundle was changed. AES-GCM authenticates the data, so tampering is detected instead of producing garbage.

## Related tools

- [Password generator](https://benchline.fabwaseem.com/t/password-generator): Cryptographic passwords and passphrases, with an entropy strength meter.
- [Hash generator](https://benchline.fabwaseem.com/t/hash-generator): MD5, SHA-1, SHA-256, and SHA-512 checksums for text or a file, with HMAC.
- [Key pair](https://benchline.fabwaseem.com/t/rsa-keypair): Generate RSA, EC, and Ed25519 keys, and convert PEM and JWK.
- [Base64 codec](https://benchline.fabwaseem.com/t/base64-codec): Encode and decode Base64 for text or a file, including the URL-safe alphabet.
