Vigenere cipher encoder

Encode text with the classic Vigenere cipher for puzzles and cryptography lessons. It is a historical puzzle cipher that can be broken.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text and key.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Encoded = (x + k) mod 26, where x is the text letter index and k the matching key letter index (A = 0). The key advances on letters only and repeats.

Example

Inputs: Key = LEMON. Result: Encoded text: lxfopv ef rnhr.

attack at dawn
lxfopv ef rnhr

Limits and caveats

  • This is a puzzle and teaching cipher that is easy to break, so never use it to protect passwords or sensitive data.
  • Digits and symbols in the key are ignored, and those in the text are left unchanged.

Questions about this tool

Does the key advance on spaces?

No. The key advances on letters only, which is the usual convention in cryptography books.

What if the key is shorter than the text?

The key repeats from the start until every letter of the text is covered.

Is the Vigenere cipher secure?

No. It has been breakable since the 19th century with the Kasiski method and frequency analysis, so use it for puzzles only.