Tools / XOR Cipher

XOR Cipher Tool

Paste ciphertext as hex or raw text, enter the XOR key (text or hex), and see the decrypted output as both ASCII and hex. The key repeats cyclically. If you don't know the key, enable single-byte brute force to rank all 256 candidates by how printable the output is.

The key repeats cyclically if shorter than the ciphertext.

Paste ciphertext above to get started.

How XOR encryption works

XOR (exclusive OR) is a bitwise operation that returns 1 only when its two input bits differ. Applying XOR twice with the same key restores the original value: (A ⊕ K) ⊕ K = A. This makes XOR both encryption and decryption with the same key.

In CTF challenges, XOR is often combined with a single repeating byte key or a short text key. If the plaintext starts with a known prefix like picoCTF{, you can recover part of the key directly by XOR-ing those known bytes against the ciphertext.

Challenges solved with this tool: picoCTF 2025 — Quantum Scrambler, picoCTF 2025 — ChaCha Slide.