01What is XOR Encryptor?
XOR is the smallest reversible cipher there is, and this page lets you watch it work one byte at a time. You type some text, give it a key, and see exactly which bits flip. Both the input and a text key are turned into bytes with UTF-8, the encoding defined in RFC 3629. That is the same thing Python's str.encode() and the browser's TextEncoder do. So an accented letter or an emoji is not a problem. It simply becomes two to four bytes, and each of those bytes gets XORed. Pick Hex Key if you want exact byte values. The key must be whole bytes, like FF or 1F 2A 3B. Spaces and a leading 0x are stripped first. An odd number of digits or a stray letter such as G shows a red warning, and no output is produced until you fix it. The key repeats from the start once it runs out, so a three-byte key covers text of any length. Here is a quick one. Hello XOR the text key key gives the bytes 23 00 15 07 0a, or IwAVBwo= in Base64. The second byte is 00 because e XOR e is always zero. That is the whole weakness of XOR in one byte: wherever plaintext and key match, you get nothing. You get three outputs. Output (Hex) shows spaced byte pairs. Output (Base64) uses the standard alphabet from RFC 4648 with = padding. Output (Text, printable) shows printable ASCII and turns everything else into dots. Below that, the Reversibility Proof XORs the result with the same key again, decodes it as UTF-8 and tells you whether it matches what you typed. The byte-by-byte table lists the input, key and result for each position, as characters and as eight-bit binary. It shows the first 50 bytes and tells you how many more there are. A few honest limits. The input box only accepts text, so you cannot paste a hex or Base64 ciphertext back in and decrypt it here. Use the hex output with your own script for that. A repeating key also falls quickly to frequency analysis and known-plaintext tricks. Treat this as a teaching and CTF aid, not a way to protect data. All the XOR math happens in your tab with plain JavaScript, so the text and key you type never leave the page.
CS students, CTF players and reverse engineers who want to see repeating-key XOR at the byte level and generate known test vectors. The tool runs entirely in your browser, so your data never leaves your device.
02How to use XOR Encryptor
- Type or paste your plaintext into Input Text.
- Enter the Key and choose Text Key or Hex Key under Key Format.
- Read the result in Output (Hex), Output (Base64) and Output (Text, printable).
- Check the Reversibility Proof box to confirm the round trip matches your input.
- Use Show Byte-by-Byte or Hide Byte-by-Byte to follow each operation in binary.
03Worked examples
- Input:
Text: Hello, Key: key (Text Key) - Result:
Hex: 23 00 15 07 0a Base64: IwAVBwo= Reversibility Proof: Hello - The second byte is 00 because e XOR e is zero. The 3-byte key repeats from the fourth byte.
- Input:
Text: Secret, Key: FF (Hex Key) - Result:
Hex: ac 9a 9c 8d 9a 8b Base64: rJqcjZqL - XOR with FF flips every bit. All six result bytes are non-printable, so the text view shows six dots.
- Input:
Text: abc, Key: 20 (Hex Key) - Result:
Hex: 41 42 43 Base64: QUJD Text: ABC - 0x20 is the bit that separates lowercase and uppercase ASCII letters.
- Input:
Text: é, Key: A (Text Key) - Result:
Hex: 82 e8 Base64: gug= - é is two bytes in UTF-8 (c3 a9), so you get two output bytes.
- Input:
Text: Hi, Key: 0x1F 2A (Hex Key) - Result:
Hex: 57 43 Base64: V0M= Text: WC - The 0x prefix and the space are stripped before parsing.
- Input:
Text: Hi, Key: F (Hex Key) - Result:
No output. Warning: Hex key must be whole bytes: an even number of 0-9/A-F digits, e.g. FF or 1F 2A 3B. - A single hex digit is half a byte, so the key is rejected.
04Common use cases
- Showing a class why the same character in plaintext and key produces a zero byte
- Building a quick CTF puzzle with a single-byte hex key such as 5A and checking the Base64 you hand out
- Checking a deobfuscation script against a known plaintext when a malware sample uses a short XOR key
- Producing test vectors (input, key, expected hex) for an XOR routine in C, Go or Python
- Showing that XOR with 0x20 flips the case of ASCII letters
- Seeing how many bytes a non-ASCII string really takes before you XOR it in your own code
05Tips
- If you see a run of 00 bytes in the hex output, the plaintext matches the key at those positions. Attackers look for exactly that.
- XORing two ciphertexts made with the same repeating key cancels the key out and leaves plaintext XOR plaintext, which is often readable.
- A hex key of 20 flips ASCII letter case, so if a CTF output looks like your text in the wrong case, try that key first.
- Only a truly random key as long as the message, used once, gives one-time pad secrecy. For real data use AES-GCM through Web Crypto or libsodium.
- The printable text view shows dots for every non-printable byte, so copy the hex or Base64 output when you need the exact bytes.
06Related concepts
XOR cipher, One-time pad, Repeating-key XOR, Bitwise operations, CTF.
Frequently Asked Questions
What is XOR Encryptor?
XOR Encryptor is a free, browser-based developer tool on AIDToolStack. XOR encrypt/decrypt text It requires no installation or sign-up and works entirely in your browser.
Is XOR Encryptor free to use?
Yes. No sign-up, no fees and no usage cap.
Does XOR Encryptor store my data?
No. It runs in your browser; nothing is uploaded.