Vigenere Cipher Converter

Encrypt or decrypt text with a repeating keyword using modulo 26 shifts.

Technology and NetUpdated 2026-11-192 min read
Vigenere Cipher Converter
Up to 200 characters. Non letters pass through unchanged.
Letters only, 1 to 50 characters. The keyword repeats across the message.
Converted message
...
Keyword used...
Keyword length...
Letters shifted...

What it does

The Vigenere cipher is a polyalphabetic substitution that uses a keyword to choose a different Caesar shift for each letter. It was considered unbreakable for centuries because it hides the frequency pattern of a single alphabet substitution.

This tool takes a message and a keyword, then encrypts or decrypts by adding or subtracting the key letter value modulo 26. Non letter characters are kept in place and do not advance the keyword.

The page opens with the classic example ATTACKATDAWN and the keyword LEMON. The ciphertext is LXFOPVEFRNHR, and using decrypt mode with the same key recovers the original text.

The strength of the cipher depends on the keyword. A short key repeats often and leaves patterns that can be exploited once the key length is guessed. A key as long as the message and never reused gives much stronger protection.

This converter assumes the Latin alphabet only. It is useful for learning classical cryptography but is not suitable for protecting real information.

How to use

  1. Type the message to encrypt or decrypt.
  2. Enter a keyword made of letters.
  3. Choose encrypt or decrypt.
  4. Read the converted message as the main result.
  5. Check the keyword length to understand how often shifts repeat.
  6. Decrypt the output with the same keyword to verify the round trip.

Formula

Encryption: C(i) = (M(i) + K(i)) mod 26. Decryption: M(i) = (C(i) - K(i)) mod 26
M(i)
Plaintext letter at position i, with A mapped to 0.
K(i)
Keyword letter at that position, repeated as needed.
C(i)
Ciphertext letter at position i.

The keyword letter value is its alphabet index from 0 to 25. Non letter characters are copied without consuming a keyword position, which is a practical convention for modern text. Traditional treatments often strip punctuation entirely.

Worked example

Example: ATTACKATDAWN with key LEMON

The page opens with message ATTACKATDAWN and keyword LEMON in encrypt mode.

  1. Repeat the keyword to get LEMONLEMONLE.
  2. The first plaintext letter A has key letter L, whose value is 11, giving L.
  3. The second letter T has key E, value 4, giving X.
  4. Continuing with the repeated key produces the stream LXFOPVEFRNHR.
  5. Switch to decrypt mode with the same key to recover ATTACKATDAWN.
  6. The tool reports result LXFOPVEFRNHR and keyword length 5.

Reference table

Sample Vigenere conversions
MessageKeywordOperationResult
ATTACKATDAWNLEMONEncryptLXFOPVEFRNHR
LXFOPVEFRNHRLEMONDecryptATTACKATDAWN

Limits

  • Messages are limited to 200 characters and keywords to 50 letters.
  • Only Latin letters are transformed.
  • The cipher provides no modern security.
  • Uppercase and lowercase are preserved independently.

Common mistakes

  • Using a different keyword to decrypt than to encrypt.
  • Assuming the cipher cannot be broken.
  • Forgetting that a short keyword repeats.
  • Including digits or spaces in the keyword.
  • Expecting non letter characters to be removed rather than preserved.

Try it yourself

Quick checks. Answers sit tucked under each question.

Decrypt LXFOPVEFRNHR with keyword LEMON.

ATTACKATDAWN.

How long is the repeated key in the default example?

Five letters, LEMON.

Why is Vigenere stronger than Caesar?

It uses several alphabets, which masks single letter frequency patterns.

Questions

What is a Vigenere cipher?

A substitution cipher that applies a different Caesar shift for each letter based on a keyword.

How do I decrypt?

Subtract the repeated keyword letter value from each ciphertext letter.

Is it the same as ROT13?

No. ROT13 uses one fixed shift, while Vigenere changes shift with the key.

What makes the key strong?

Length and unpredictability. A long key that is never reused is much stronger.

Can punctuation be included?

It passes through unchanged in this tool and does not advance the key.

Is this secure today?

No. It is a classical teaching cipher.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.