Vigenère cipher · keyword shifts

Vigenère cipher with a keyword

The Vigenère cipher was once called “le chiffre indéchiffrable”, the unbreakable cipher. It uses a keyword to shift each letter by a different amount, so the same letter can be encoded in different ways. Enter a keyword, then type to encode or paste a ciphertext to decode it.

How to use the tool

  1. 1

    Enter the keyword

    Type the key, for example LEMON. Only its letters count; case does not matter.

  2. 2

    Choose Encode or Decode

    Encode turns your message into ciphertext; Decode reverses it with the same keyword.

  3. 3

    Type the message

    Letters are shifted by the matching key letter. Spaces and punctuation stay put and do not use up the key.

  4. 4

    Check with swap

    Press swap to decode the result again and make sure it gives back your message.

QRScanKaro

Planning a treasure hunt?

Print each clue as a QR code: players scan it to reveal the next coded message. Make QR codes with your colours and logo, free.

Make a clue QR →

Frequently asked questions

How does the keyword shift the letters?

Each key letter is a Caesar shift: A = 0, B = 1 … Z = 25. The key repeats along the message. With LEMON, ATTACKATDAWN becomes LXFOPVEFRNHR: A + L = L, T + E = X, T + M = F, and so on.

Is the Vigenère cipher secure?

No. Charles Babbage and Friedrich Kasiski showed in the 1800s how to find the key length from repeated patterns, and then each position is a simple Caesar cipher. It is a good puzzle and a great way to learn, not a way to protect secrets.

Do spaces and punctuation use up the key?

No. Here, as in most puzzle books and online tools, only letters move the key forward. If a puzzle was made with a tool that counts spaces too, remove the spaces from the ciphertext before decoding.

What happens if the keyword is a single letter?

Then every letter gets the same shift, and Vigenère becomes a Caesar cipher. A key of D is the same as Caesar with shift 3.