Skip to content
D DocNectar

Free One-Time Pad Encoder and Decoder

Encrypt or decrypt text with a one-time pad, adding a key at least as long as your message for theoretically unbreakable encryption.

100% Free No Signup Works on all devices

Last updated October 10, 2026 · Report an error

Thanks for rating!

The one-time pad is the only classical cipher proven to be mathematically unbreakable — but only when used exactly as intended: with a truly random key, at least as long as the message, used exactly once and never reused.

This tool encrypts or decrypts text using a one-time pad with a key you provide, and it enforces the key-length rule that makes the cipher secure in the first place.

How it works

Enter your text and a key of letters. Each letter's position (A=0 ... Z=25) is added to the matching key letter's position, wrapping mod 26, to encrypt — or subtracted to decrypt. Unlike a Vigenère cipher, the key is never repeated or wrapped around: this tool requires the key to have at least as many letters as your message, and will tell you if it's too short rather than silently reusing it.

  1. Enter mode.
  2. Enter text.
  3. Enter key (at least as long as your text, letters only).
  4. Click Calculate to see your results.

Examples

A 12-letter message and a 12-letter key

"ATTACKATDAWN" encrypted with the key "XMCKLARBIQPT" (also 12 letters) produces ciphertext that reveals nothing about the message without that exact key.

Who should use it

  • Teaching the mathematical concept of information-theoretic (provable) security.
  • Puzzle and cryptography-education contexts exploring why "unbreakable" ciphers are hard to use in practice.

Industry applications

  • Cryptography education and theory
  • Historical diplomatic and intelligence communications

Advantages

  • The only classical cipher with a mathematical proof of unbreakability, when used correctly.
  • Simple arithmetic (modular addition) once you have a proper key.

Limitations

  • Requires a truly random key at least as long as the message — genuinely impractical for most real-world use.
  • Any key reuse completely destroys its security guarantee.

Common mistakes to avoid

  • Providing a key shorter than the message and expecting it to work — real one-time pad security depends on never repeating key material.
  • Reusing the same key for multiple different messages, which breaks the security guarantee entirely.

Best practices

  • Generate your key from a genuinely random source (not a memorable phrase) if you want to explore the real security properties of a one-time pad, not just its arithmetic.
  • Never reuse a one-time pad key across more than one message.

Tips

  • If you want to see genuinely unbreakable encryption in action, generate your key using a random source completely unrelated to your message — a memorable phrase as a "key" undermines the whole point.

Frequently asked questions

Yes, with no signup and no limit on how many conversions you run.
A one-time pad is only truly unbreakable if the key is at least as long as the message and never reused. Repeating or reusing a shorter key turns it into a Vigenère cipher, which is breakable — so this tool requires a full-length key rather than silently wrapping it.
Yes, in theory — but only if the key is truly random, kept completely secret, used exactly once, and is at least as long as the message. In practice, generating and safely sharing such a key is the hard part, which is why one-time pads are rarely used outside specialized diplomatic or intelligence contexts.
You shouldn't — reusing a one-time pad key is the single most common way real one-time pads have been broken historically (it lets an attacker combine two ciphertexts to cancel out the key).

Get new calculators and guides in your inbox

No spam — just new tools like One-Time Pad Cipher Tool and practical guides.

Favorites