← All text tools

XOR, Vernam and One-Time Pad Cipher

Encrypt and decrypt with a repeating-key XOR cipher or a Vernam one-time pad, output hex or Base64, make a random pad key and estimate the key length of an XOR ciphertext.

  • Free
  • No sign-up
  • Works on any device

About XOR, Vernam and One-Time Pad Cipher

XOR combines each byte of the message with a byte of the key, and doing it again with the same key gives the message back. With a short repeating key it is a simple obfuscation that is easy to break. With a truly random key as long as the message, used once, it becomes the Vernam one-time pad, the only cipher proved unbreakable. This tool encrypts and decrypts both ways with a text or hex key, shows the result as hex or Base64, makes a random pad key in your browser, and guesses the key length of a repeating-key XOR ciphertext.

How to use XOR, Vernam and One-Time Pad Cipher

  1. Choose repeating-key XOR, one-time pad or key-length analysis.
  2. Type the message and key, or press the button to make a random pad key as long as the message.
  3. Copy the hex or Base64 ciphertext, or paste ciphertext back with the key to decrypt.

Why use this tool?

Also known as

Frequently asked questions

What makes a one-time pad unbreakable?

The key must be truly random, as long as the message, kept secret and never reused. Break any one of these rules and the guarantee is gone, and two messages with one pad can be compared to reveal both.

How does the key-length analysis work?

It compares neighbouring blocks of the ciphertext. When the block size equals the key length, the blocks share a key, so their bit distance is lower. It needs several times the key length in English text.

Why does decryption with the wrong key show odd characters?

XOR with a wrong key gives bytes that are not valid text, so the output is a mix of symbols. The page warns when the result is not valid UTF-8.

Is XOR, Vernam and One-Time Pad Cipher free?

Yes. XOR, Vernam and One-Time Pad Cipher on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put XOR, Vernam and One-Time Pad Cipher on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.