XOR Bytes Tool

XOR bytes with a repeating key, using UTF-8, hex, Base64 or Base64url input and explicit output encoding.

A byte operation with explicit encodings

Each output byte is input[i] XOR key[i mod key.length]. UTF-8 text is encoded to bytes first; hex accepts whitespace between complete byte pairs. Base64 and Base64url have separate alphabets and strict trailing-bit checks. An empty key is rejected.

The output encoding is independent of the two input encodings. Applying XOR again with the same key restores the original bytes, provided you decode the first output correctly. Invalid UTF-8 output reports an error instead of silently replacing bytes with replacement characters.

Useful for inspection, not secure encryption

Repeating-key XOR is useful for byte-level exercises and reproducing simple obfuscation. It exposes repeated structure and provides no authentication; it is not a replacement for an authenticated encryption scheme.

Input is limited to 1 MiB decoded bytes and the key to 64 KiB. The computation stays in a cancellable Worker. Download preserves the selected textual encoding, including a UTF-8 BOM and CR/LF result bytes; the text box may display normalized line endings.

Reference

Questions & answers

Why can hex output be longer than the input?

Every byte needs two hex digits. Unicode text may also use several UTF-8 bytes per displayed character.

Can I use a one-byte key?

Yes. It is repeated over all input bytes. The tool does not treat that as secure encryption.

Is my input uploaded?

No. Processing runs in your browser. Engines load from this site; the tool does not send input to a processing API or save it. Clear removes the visible input and result.

Other Languages