Skip to main content
xorcipherencryptionhexwebdevtoolbox

How to Use the XOR Cipher Tool — WebdevToolbox Guide

Encrypt text with a repeating-key XOR cipher and view the result as hex or Base64, with matching decryption back to plain text.

WebdevToolbox Team2 min read

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

  1. Open the tool at /tools/xor-cipher.
  2. Type your text and a key.
  3. Choose hex or Base64 output format.
  4. 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/TextDecoder APIs — 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.

Tagged with

xorcipherencryptionhexwebdevtoolbox

Related posts