XOR is the workhorse operation behind a surprising number of real cryptographic and CTF-puzzle systems — combine each byte of your text with a repeating key byte-by-byte, and the exact same operation undoes it again. This tool encrypts and decrypts it instantly, output as hex or Base64.
What Is the XOR Cipher Tool?
Enter text and a key, and the tool XORs each byte of your text against the repeating key, showing the result as hex or Base64. Switch to decrypt mode and paste in an encoded string with the same key to recover the original text — since XOR is its own inverse, encrypting and decrypting use the exact same underlying operation.
How to Use It
- Open the tool at /tools/xor-cipher.
- Type your text and a key.
- Choose hex or Base64 output format.
- Click Encrypt to get the encoded result, or switch to Decrypt and paste in encoded text to recover the original.
Key Features
- Repeating-key byte-level XOR, the same fundamental technique used in many real encoding/obfuscation schemes and CTF challenges.
- Hex or Base64 output, since XOR produces raw bytes that aren’t always printable directly.
- Matching encrypt/decrypt modes using the identical underlying operation.
- Runs entirely in your browser using the Web Crypto-adjacent
TextEncoder/TextDecoderAPIs — nothing is sent to a server.
When to Use This Tool
- Solving CTF (Capture the Flag) challenges that use XOR-based encoding.
- Learning how XOR encryption and its self-inverse property work.
- Simple obfuscation of non-sensitive text for testing or teaching purposes.
Try It Now
Open XOR Cipher Tool directly, or press ⌘K and type the tool name from anywhere on the site.
Part of the Security & Crypto collection on WebdevToolbox — free, browser-based developer tools with no login required.