XOR Calculator
XOR two values byte-for-byte, live as you type, in text or hex.
XORs byte-for-byte, cycling the shorter value if the two inputs differ in length (a repeating-key XOR, the same technique behind simple stream ciphers — not secure encryption on its own). Result is always shown as hex regardless of input format. Runs entirely in your browser.
Need the opposite? Bitwise Calculator
What is XOR Calculator?
XORs two values byte-for-byte, cycling the shorter one if the inputs differ in length. It's the same repeating-key technique behind simple stream ciphers (not secure encryption on its own, but a common building block and a useful thing to compute directly when working with binary data or a CTF challenge).
XOR Truth Table
| A ⊕ B | Result |
|---|---|
| 0 ⊕ 0 | 0 |
| 0 ⊕ 1 | 1 |
| 1 ⊕ 0 | 1 |
| 1 ⊕ 1 | 0 |
How to Use the XOR Calculator
- 1
Enter Both Values: Type two values, as text or hex.
- 2
Read the XOR Result Instantly: The byte-for-byte XOR result appears automatically as hex.
How XOR Works Bit by Bit
XOR (exclusive or) compares two bits and outputs 1 only when they differ, 0 when they're the same. Applied to a whole byte, each bit position is XORed independently against the same position in the other byte. Worked example: 12 is 1100 in binary and 10 is 1010. XORing them bit by bit (1⊕1=0, 1⊕0=1, 0⊕1=1, 0⊕0=0) gives 0110, which is 6 in decimal (shown as 0x6 in hex). For values longer than a single byte, this tool repeats (cycles) the shorter input against the longer one, one byte at a time, then shows the full result as hex.
Frequently Asked Questions
Common questions about XOR Calculator.