Vigenère Cipher

Use a repeating keyword to apply many Caesar shifts to your message.

Difficulty: Beginner

How it works

  1. Pick a keyword made only from letters, for example LEARN. Each letter of the keyword represents a shift: A = 0, B = 1, ..., Z = 25.
  2. Write your plaintext, then write the keyword repeatedly underneath so that each plaintext letter lines up with one keyword letter.
  3. To encrypt, shift each plaintext letter forward in the alphabet by the amount given by its keyword letter (e.g. E = 4, N = 13).
  4. To decrypt, line up the same keyword under the ciphertext and shift letters backwards by the keyword amounts.
  5. Varying the shifts with a keyword hides simple frequency patterns and shows why using more than one Caesar shift makes attacks harder.
Press Shift + Enter

What is it?

The Vigenère Cipher is a method of encrypting alphabetic text using a simple form of polyalphabetic substitution. It was famously known as 'le chiffre indéchiffrable' (the indecipherable cipher) for over three centuries. By using a repeating keyword, the cipher shifts each letter of the plaintext by a different amount, effectively smoothing out the natural frequency distribution of letters and defeating simple frequency analysis. It was eventually broken by Friedrich Kasiski in 1863, who published a method for determining the length of the keyword.

Try it yourself

Manual Solver & Real-Life Method

Can you decrypt this challenge?

RIJVS UYVJN (Hint: Keyword is KEY)

How to solve it in Real Life (Tabula Recta)

In the real world, spies and soldiers didn't do math in their heads—they used a printed 26x26 grid called a Tabula Recta (or Vigenère Square).

  • To Encrypt: Find the column of your Plaintext Letter and the row of your Keyword Letter. The cell where they intersect is your Ciphertext!
  • To Decrypt: Go to the row of your Keyword Letter, scan across until you find your Ciphertext Letter, then look straight up to the top of that column to find the original Plaintext.
K \ P ABCDEFGHIJKLMNOPQRSTUVWXYZ
AABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZA
CCDEFGHIJKLMNOPQRSTUVWXYZAB
DDEFGHIJKLMNOPQRSTUVWXYZABC
EEFGHIJKLMNOPQRSTUVWXYZABCD
FFGHIJKLMNOPQRSTUVWXYZABCDE
GGHIJKLMNOPQRSTUVWXYZABCDEF
HHIJKLMNOPQRSTUVWXYZABCDEFG
IIJKLMNOPQRSTUVWXYZABCDEFGH
JJKLMNOPQRSTUVWXYZABCDEFGHI
KKLMNOPQRSTUVWXYZABCDEFGHIJ
LLMNOPQRSTUVWXYZABCDEFGHIJK
MMNOPQRSTUVWXYZABCDEFGHIJKL
NNOPQRSTUVWXYZABCDEFGHIJKLM
OOPQRSTUVWXYZABCDEFGHIJKLMN
PPQRSTUVWXYZABCDEFGHIJKLMNO
QQRSTUVWXYZABCDEFGHIJKLMNOP
RRSTUVWXYZABCDEFGHIJKLMNOPQ
SSTUVWXYZABCDEFGHIJKLMNOPQR
TTUVWXYZABCDEFGHIJKLMNOPQRS
UUVWXYZABCDEFGHIJKLMNOPQRST
VVWXYZABCDEFGHIJKLMNOPQRSTU
WWXYZABCDEFGHIJKLMNOPQRSTUV
XXYZABCDEFGHIJKLMNOPQRSTUVW
YYZABCDEFGHIJKLMNOPQRSTUVWX
ZZABCDEFGHIJKLMNOPQRSTUVWXY

Scroll the grid left and right to see all 26 columns.

Where this shows up today

To overcome the vulnerabilities of monoalphabetic ciphers against frequency analysis.