Online XOR Tool for Text, Hex, Binary and Base64

BeetVPN

Input

Input

XOR result

Result
Formats and preview

Understanding the XOR operation

XOR, or exclusive OR, compares two bits. The result is 1 when the bits differ and 0 when they are identical. The operation is reversible: applying the same key to the result a second time restores the original bytes.

Repeating key

When the key is shorter than the input, its bytes are repeated. This is useful for analysing a format or reproducing a calculation, but a short repeating key is not secure modern encryption.

Two buffers

The equal-length buffer mode applies XOR byte by byte. It can compare binary data, remove a mask or verify one step of another algorithm.

Formats

The input, key and result can be represented as UTF-8 text, hexadecimal, binary or Base64. Binary-safe formats prevent data loss when the result contains non-printable bytes.

Simple example

The letter A is 41 in hexadecimal. With the key 20, 41 XOR 20 produces 61, which is the letter a. Applying 20 to 61 again restores 41.

Security limitations

A random key that is as long as the message and never reused follows the one-time-pad principle. Repeating a short key, however, exposes patterns and enables statistical attacks. Use this tool for learning, interoperability and data analysis rather than as a replacement for modern authenticated encryption.

Repeating-key XOR for text, hex, binary and Base64

XOR compares the bits of the input and key. Applying the same key twice restores the original bytes. The tool accepts several representations and automatically repeats a key that is shorter than the message.

Text ABC with key K → hexadecimal 0a 09 08
Apply key K to 0a 09 08 again to recover ABC

FAQ

Does XOR encrypt and decrypt with the same operation?

Yes. For each byte, A XOR K XOR K returns A.

Is repeating-key XOR secure?

Not for sensitive data. A short repeated key exposes patterns; use a modern authenticated cipher instead.

Why use hexadecimal or Base64 output?

XOR output can contain non-printable bytes. Hexadecimal and Base64 make those bytes safe to copy and transport.