KEY
HELLO
030015070A
H(72)^K(75)=03, E(69)^E(69)=00, L(76)^Y(89)=15, L(76)^K(75)=07, O(79)^E(69)=0A.
Encrypt and decrypt text with the XOR cipher online. The tool applies the bitwise exclusive OR operation byte-by-byte, supports text keys and hex keys, repeats short keys cyclically, and returns encrypted output as a hexadecimal string.
KEY
HELLO
030015070A
H(72)^K(75)=03, E(69)^E(69)=00, L(76)^Y(89)=15, L(76)^K(75)=07, O(79)^E(69)=0A.
SECRET
ATTACK AT DAWN
12111713061F730417720115040B
Each letter XOR-ed with the cycling key SECRET. The space character is included in the XOR operation.
KEY
030015070A
HELLO
Paste the hex string and use the same key — XOR restores the original text.
42 (HEX)
HELLO
0A070E0E0D
Key format: Hex. Single-byte key 0x42: H(0x48)^0x42=0x0A, E(0x45)^0x42=0x07, L(0x4C)^0x42=0x0E, O(0x4F)^0x42=0x0D.
The XOR cipher is a symmetric byte-level encryption method based on the bitwise exclusive OR operation. Each byte of the input message is combined with one byte of the key. If the key is shorter than the message, the key is repeated cyclically until every byte has been processed.
XOR has a useful reversible property: applying the same key a second time restores the original data. That is why this tool can use the same algorithm for encryption and decryption. In Encrypt mode it takes normal text and returns hexadecimal ciphertext. In Decrypt mode it expects a valid hex string, converts it back to bytes, applies XOR with the same key, and returns the plaintext.
This approach is often described as gamma encryption because the key bytes act like a keystream, or gamma, that is combined with the message. The quality of that keystream determines the strength of the result.
The service supports two key formats. In Text mode, the key is treated as ordinary UTF-8 text. In Hex mode, the key is interpreted as raw bytes written in hexadecimal form, so values such as DEADBEEF or DE AD BE EF can be used directly.
Encrypted output is shown in uppercase hex because XOR can produce arbitrary binary bytes, including bytes that are not printable text. Hex encoding makes the result safe to copy, store, paste into the decoder, or use in tests and examples.
When decrypting, the input must be hexadecimal ciphertext. Spaces and non-hex separators are ignored, but the remaining hex data must contain complete byte pairs.
The XOR cipher and the Vernam cipher use the same core operation: message bytes are combined with key bytes using XOR. The practical difference is how the key is chosen and reused.
A true one-time pad requires a random key that is at least as long as the message and never used again. Under those conditions, XOR-based encryption can provide perfect theoretical secrecy. A typical XOR cipher tool, however, uses a reusable key and repeats it when necessary. This is convenient for learning, debugging, and experimentation, but it does not provide modern cryptographic security.
Use this online XOR encoder and decoder to study bitwise encryption, test how repeating-key XOR works, inspect hex ciphertext, or reproduce simple XOR transformations in educational materials and programming tasks.
For real protection of passwords, private messages, API tokens, or production data, use a modern authenticated encryption algorithm instead of a classical repeating-key XOR cipher.
XOR-based Vernam encryption with Base64 output.
Convert text and bytes to hexadecimal format and decode hex sequences back to text.
Keyword-based polyalphabetic encryption and decryption.
Classic letter-shift cipher with custom shift values.
Online monoalphabetic substitution cipher with a custom shuffled alphabet key.
Classic digraph substitution cipher with keyword matrix encryption.