XOR Cipher Encrypt / Decrypt

Type text and a key — get the XOR result as hex or base64, and decrypt it back with the same key.

Why XOR

XOR flips a bit wherever the key has a 1. Applying the same key again flips the same bits back — making encryption and decryption the same operation. It is the building block of real ciphers, but a short repeating key is trivially broken.

Frequently asked questions

Is XOR secure?

Not alone — a repeating key leaks patterns. Real systems use it as a component inside vetted ciphers.

Hex or base64?

Hex is easier to eyeball byte-by-byte; base64 is more compact for transport.

Non-ASCII text?

Input is UTF-8 encoded first, so any characters work.