PB
Available
lock
lock Free · Private · In-Browser

XOR Cipher

XOR text against a repeating key to hex, and back — a classic teaching cipher.

The classic XOR cipher

XOR is the simplest reversible cipher: combine each byte of your text with a repeating key, and combining again with the same key restores the original. It is a staple of programming exercises and capture-the-flag puzzles.

Encrypting "Hello" with the key "key" produces a short hex string; feeding that hex and the same key back returns "Hello". The operation is identical both ways, which is the whole charm of XOR.

A teaching tool, kept private

A repeating-key XOR offers no real security and should never guard sensitive data, but it runs entirely in your browser so your text stays local.

Frequently Asked Questions

How does the XOR cipher work?

Each character is combined with a character of the key using the exclusive-or operation. Applying the same key again reverses it, which is why encrypt and decrypt share one operation.

Is this secure?

No. A repeating-key XOR is trivially broken and must never protect real data. It is a learning tool and a lightweight obfuscation at best.

What is the output format?

Encryption produces hexadecimal so the bytes are printable; decryption takes that hex plus the key and returns the original text.

Take it further
All Free Tools

Browse the full set of free, private, in-browser tools.

Learn More arrow_forward