XOR Cipher Encrypt / Decrypt

XOR text with a repeating key. Encrypt to hex, decrypt hex back to text. Runs in your browser.

Frequently asked questions

How does the XOR cipher work?

Each byte of your text is combined with a byte of the key using a bitwise XOR, repeating the key as needed. XORing again with the same key restores the original — so encrypt and decrypt use the same operation.

Why is the output in hex?

XOR produces raw bytes that aren't all printable, so the result is shown as hexadecimal. Paste that hex back with the same key and hit ‘Decrypt’ to recover the text.

Is repeating-key XOR secure?

No. With a short, reused key it's easily broken and is meant for learning and CTFs. For real encryption use AES.