XOR cipher (text)

Encrypt a text with a repeating XOR key (result in hexadecimal), or decrypt a previously encrypted hexadecimal string.

Example:

How it works

XOR encryption combines each byte of the text with a byte of the key (repeated cyclically) via the exclusive-OR logical operation, and the result is encoded in hexadecimal to remain readable and transmissible as text. Useful for quickly obscuring a string of characters or practicing the basics of cryptography — this is not robust encryption for protecting sensitive data.

Why is the encrypted result in hexadecimal?

The raw result of the XOR operation can contain non-printable bytes. Hexadecimal encoding (two characters per byte) guarantees a result that is always readable and copyable, regardless of the key used.

What happens if I decrypt with the wrong key?

Decryption produces bytes that generally don't correspond to valid UTF-8 text, which triggers an explicit error rather than a silently inconsistent result.

100% local processing: encryption runs entirely in your browser via WebAssembly, your text and key never leave your device.