Skip to content
ToolsOnDuty - free online tools
Security & Cryptography

XOR Cipher

Encrypt and decrypt text with a repeating-key XOR cipher.

Free foreverRuns in your browserNo sign-up

XOR with a repeating key is a simple, reversible transform shown as hex. It is fine for obfuscation and learning, but not secure; use AES for real secrets.

100% private - runs entirely in your browser.

Your input, keys and passwords are never uploaded. Want proof? Load this page, then turn off your internet - the tool still works. For an exact check, open your browser's DevTools Network tab and confirm no data is sent when you use it.

About the XOR Cipher

Encrypt text by XOR-ing each byte with a repeating key, shown as hex, and decrypt the hex back to text.

XOR is the building block of many ciphers and a common obfuscation trick in programming.

The same key both encrypts and decrypts.

Key features

  • Encrypt to hex and decrypt back
  • Repeating-key XOR
  • UTF-8 aware
  • Copy the result instantly

How to use

  1. 1Choose encrypt or decrypt.
  2. 2Enter your text (or hex) and a key.
  3. 3Copy the result.

Examples

Encrypt
Input: Hi with key K
Output: hex bytes

Each byte is XOR-ed with the repeating key.

Decrypt
Input: the hex with key K
Output: Hi

The same key reverses it.

Frequently asked questions

Is XOR encryption secure?
A repeating-key XOR is easy to break and is not secure. Use it for obfuscation or learning, and AES for real secrets.
Why is the output hex?
XOR can produce non-printable bytes, so the result is shown as hex to keep it readable and safe to copy.
Is my data uploaded?
No. Everything runs in your browser.