JWE Encrypt
Create a compact encrypted token with a shared 256-bit key
Keep the Base64URL key separate from the compact JWE. Both are required to decrypt the message.
Create a compact JWE
The key and token are both Base64URL-safe.
Encryption uses a 256-bit key. Generate one here or paste an existing shared key.
What This JWE Contains
Compact JWE stores a protected JSON header, initialization vector, ciphertext, and authentication tag in one five-part Base64URL token. This focused workflow uses a previously shared symmetric key directly, so the second token segment is empty.
Create a Compact JWE
- Generate a 256-bit key or paste the Base64URL key expected by the other system.
- Paste the UTF-8 text you want to protect.
- Encrypt, copy the compact token, and transfer the key separately.
JWE Compatibility
Encryption uses alg: dir with enc: A256GCM. Decryption accepts direct-key A128GCM, A192GCM, and A256GCM compact tokens. Password-based PBES2, RSA, ECDH, compressed payloads, and JWE JSON Serialization use different workflows and are not guessed here.
The format is defined by RFC 7516 and its algorithms by RFC 7518.