XOR Cipher Tool

Encrypt or decrypt text with XOR using a text or hex key. Shows hex and base64 output, warns when the key is shorter than the plaintext.

Use the XOR Cipher Tool

Output (text)
Hex
—
Base64
—

Sample inputs — click to load

Copied!

Summary

XOR encryption applies a bitwise XOR between each byte of your input and the key bytes, cycling the key when it is shorter than the input. This tool encrypts or decrypts text, displays results in hex and base64, and warns you when key reuse weakens security.

How it works

  1. Enter plaintext (or ciphertext to decrypt) in the input field.
  2. Type a key in text or hex format and select the matching mode.
  3. The tool XORs each input byte with the corresponding key byte, cycling the key.
  4. Hex and base64 representations of the result appear instantly.
  5. A warning highlights key reuse when the key is shorter than the input.

Use cases

  • Demonstrate XOR encryption in a cryptography or security course.
  • Quickly obfuscate short strings for non-sensitive local storage.
  • Test CTF (capture-the-flag) challenges that use XOR with a repeating key.
  • Illustrate why short, repeated keys are vulnerable to known-plaintext attacks.

Frequently Asked Questions

Last updated: 2026-06-19 · Reviewed by Nham Vu