Skip to content
LovelyTools
EN

XOR Cipher

XOR text or hex bytes with a repeating key — encrypt and decrypt.

Processed locally on your device — nothing is uploaded.

About the XOR Cipher

XOR (exclusive or) combines each byte of the message with a byte of the key; when the key is shorter it repeats. Applying the same key again restores the original, which makes XOR the building block of stream ciphers, a staple of CTF challenges and a common way malware hides strings.

Enter the input as text, hex or Base64 and the key as text or hex, and get the result as hex, Base64 or text. Text is encoded as UTF-8. This is a learning and analysis tool: a short repeating XOR key is easy to break and should never protect real secrets — use AES for that.

How to use the XOR Cipher

  1. Enter the data and choose its format.
  2. Enter the key as text or hex.
  3. Choose the output format and copy the result.

Features

  • Snapshot: turn the result into a 1200×630 image with syntax colours, ready to share
  • Text, hex or Base64 input
  • Text or hex key
  • Hex, Base64 or text output
  • Same key encrypts and decrypts

Supported formats

  • Plain text

Frequently asked questions

Is XOR encryption secure?

Only as a one-time pad with a truly random key as long as the message, used once. A repeating key can be broken with frequency analysis.

Is my text sent anywhere?

No. Everything runs in your browser, so nothing you paste is uploaded or stored.