Vigenère Cipher Translator — Encode and Decode the Polyalphabetic Cipher

By Naomi Bruwer | Last edited Jun 15, 2026

Use our Vigenere Cipher Decoder to decrypt the cipher or encrypt English text!

Cipher

Encrypt / Encode Text !

Solve / Decode Text

Plain
Cipher

The Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to encrypt text. Instead of shifting every letter by the same amount (as the Caesar cipher does), it shifts each letter by a different amount depending on the corresponding letter of the keyword. The result is a cipher that resisted serious cryptanalysis for almost 300 years and earned the nickname le chiffre indéchiffrable (the indecipherable cipher), until Friedrich Kasiski published the method for breaking it in 1863.

The cipher is commonly written with the grave accent, "Vigenère," in honour of the 16th-century French diplomat Blaise de Vigenère. English-language sources, however, frequently drop the accent and write it as Vigenere cipher. Both spellings refer to the same cipher.

This tool encrypts and decrypts Vigenère ciphers using any keyword you choose, supports custom alphabets (including non-English alphabets), and offers three case-handling strategies. Below the tool you'll find a step-by-step worked example, the Vigenère square reference table, an explanation of how the cipher was eventually broken, and a discussion of the 300-year misattribution. The cipher was actually first described by Giovan Battista Bellaso in 1553, more than 30 years before Vigenère's contribution.

How to Use the Vigenère Cipher Tool

  1. Enter your Cipher Key. Pick any keyword — short ones like "KEY" or "HELLO" are common in worked examples, but longer keys produce stronger encryption.
  2. (Optional) Adjust the alphabet in the Custom Alphabet field if you're working with a non-English alphabet or a custom letter ordering.
  3. Choose a case strategy: Maintain Case preserves upper and lower case in the output; Ignore Case normalises everything; Strict treats upper and lower case as different characters.
  4. To encode, type your plaintext into the upper field and select Encode.
  5. To decode, paste the ciphertext into the lower field and select Decode.
  6. The Live Cipher Mapping table below the tool updates automatically as you change the key or alphabet, showing how each plaintext letter maps to its ciphertext counterpart.

How the Vigenère Cipher Works

The Vigenère cipher is a classic encryption technique known for its complexity compared to simpler ciphers like the Caesar Cipher. It uses a keyword to create a sequence of Caesar ciphers, making it much harder to decode without the key.

The Vigenère cipher encrypts text using a keyword to shift letters in the plaintext. Unlike the Caesar cipher, which shifts letters by a fixed amount, the Vigenère cipher uses a series of shifts based on the letters of the keyword. This puts it in a different family of classical ciphers called polyalphabetic rather than monoalphabetic. It is what makes the cipher dramatically harder to break by simple letter-frequency analysis than monoalphabetic substitutions like the Caesar cipher or the Atbash Cipher (which reverses the alphabet rather than shifting it).

Step-by-step process

  1. Choose a keyword. Select a keyword that will dictate the shifts for each letter in the plaintext. For example, if your keyword is "KEY," it will be used to determine how much to shift each letter.
  2. Align the keyword with the plaintext. Write the keyword repeatedly below the plaintext, aligning each letter of the keyword with each letter of the plaintext.
  3. Encrypt using the keyword. For each letter in the plaintext, find the corresponding letter in the keyword. Determine the shift amount based on the position of this keyword letter in the alphabet (A = 0, B = 1, C = 2, …). Apply this shift to the plaintext letter to find the ciphertext letter.

Example of encoding with the Vigenère cipher

Let's encrypt the plaintext "HELLO" using the keyword "KEY."

Align the keyword:

Plaintext: H E L L O
Keyword:   K E Y K E

Convert keyword letters to shifts:

  • K = 10 (K is the 11th letter, so we shift by 10 because the index starts at 0)
  • E = 4 (E is the 5th letter)
  • Y = 24 (Y is the 25th letter)
  • K = 10
  • E = 4

Encrypt each letter:

  • H (shift by K): H shifted by 10 is R (H + 10 = 18th letter, which is R)
  • E (shift by E): E shifted by 4 is I (E + 4 = 9th letter, which is I)
  • L (shift by Y): L shifted by 24 is J (L + 24 = 35th letter, which wraps around to J)
  • L (shift by K): L shifted by 10 is V (L + 10 = 21st letter, which is V)
  • O (shift by E): O shifted by 4 is S (O + 4 = 18th letter, which is S)

Thus, "HELLO" encoded with the keyword "KEY" becomes "RIJVS."

Example of decoding with the Vigenère cipher

To decode "RIJVS" using the keyword "KEY," follow these steps:

Align the keyword:

Ciphertext: R I J V S
Keyword:    K E Y K E

Convert keyword letters to shifts:

  • K = 10
  • E = 4
  • Y = 24
  • K = 10
  • E = 4

Decrypt each letter:

  • R (shift back by K): R shifted back by 10 is H (R − 10 = 7th letter, which is H)
  • I (shift back by E): I shifted back by 4 is E (I − 4 = 5th letter, which is E)
  • J (shift back by Y): J shifted back by 24 is L (J − 24 = 12th letter, which is L)
  • V (shift back by K): V shifted back by 10 is L (V − 10 = 12th letter, which is L)
  • S (shift back by E): S shifted back by 4 is O (S − 4 = 15th letter, which is O)

Thus, "RIJVS" decoded with the keyword "KEY" returns to "HELLO."

Characteristics of the Vigenère Cipher

  • Keyword-based shifting: Each letter in the plaintext is shifted according to the corresponding letter in the keyword, making it more secure than a single-shift cipher.
  • Polyalphabetic substitution: Unlike monoalphabetic ciphers, the Vigenère cipher uses multiple substitution alphabets, depending on the keyword, which increases security. For a technical overview of polyalphabetic substitution as a class, see Crypto-IT's guide to substitution ciphers.
  • Periodicity: The cipher's security depends on the length and randomness of the keyword. Repeating short keywords introduces patterns that, once detected, allow the cipher to be broken. This is precisely the weakness Kasiski exploited in 1863 (see below).

The Vigenère Square (Tabula Recta)

The Vigenère square (also known as the tabula recta) is the 26×26 grid that traditionally accompanies the cipher. Each row is the alphabet shifted by one more position than the row above it: row A is the standard alphabet starting with A, row B starts with B and ends with A, and so on through row Z (which starts with Z and ends with Y).

To encode by hand, find the plaintext letter along the top row and the keyword letter down the left column. The ciphertext letter sits at the intersection. To decode, find the keyword letter down the left column, scan across that row until you find the ciphertext letter, and the column header is the plaintext letter.

The square was the original 16th-century method for working a Vigenère cipher with paper and pen. Long before computers, this grid was the cipher's user interface. It's still the most efficient way to compute a Vigenère encryption by hand and remains the canonical visual taught in introductory cryptography courses today.

Vigenère square (tabula recta) — the 26×26 alphabet grid used to encode and decode Vigenère ciphers by hand
The Vigenère Square, also called the tabula recta — the canonical 26×26 reference grid for the Vigenère cipher. Click to enlarge or save.

Vigenère vs the Caesar Cipher: What's the Difference?

The Vigenère cipher is sometimes described as "a sequence of Caesar ciphers driven by a keyword" — and that's literally what it is. The Caesar Cipher shifts every letter in a message by the same fixed amount (a shift of 3 turns A into D, B into E, and so on). The Vigenère cipher shifts each letter by a different amount, with the shift values coming from the letters of a keyword.

Feature Caesar cipher Vigenère cipher
Key type One number (shift value 1–25) A keyword (any length)
Cipher family Monoalphabetic substitution Polyalphabetic substitution
Possible keys 25 non-trivial shifts Effectively unlimited
Vulnerable to frequency analysis? Yes (trivially — single most common letter ≈ E) Not directly — frequency is distributed across the keyword length
Method to break Brute force (try all 25 shifts) or single-pass frequency analysis Kasiski examination (find key length first, then frequency-analyze each shift)
Approximate era 1st century BCE First described 1553 (Bellaso); commonly attributed to Vigenère 1586

A useful way to see the relationship: pick a Vigenère keyword of length one — say, "D." That's equivalent to a Caesar shift of 3 applied to every letter. So the Caesar cipher is mathematically a degenerate case of the Vigenère cipher with a single-character key. As the keyword grows longer and more varied, the cipher becomes progressively harder to break.

The 300-Year Misattribution and Why We Still Call It "Vigenère"

The cipher universally known today as the "Vigenère cipher" was not actually invented by Blaise de Vigenère. It was first described by the Italian cryptographer Giovan Battista Bellaso in his 1553 booklet La cifra del Sig. Giovan Battista Bellaso — more than 30 years before Vigenère's own contribution. The misattribution is one of the longest-running credit errors in the history of cryptography. The Crypto Museum's Vigenère entry is one of the better online accounts of how the misattribution happened and how 20th-century cryptography historians eventually restored Bellaso's name to the record.

What did Vigenère actually contribute? In his 1586 Traicté des Chiffres, Vigenère described the autokey cipher — a clever variant in which the plaintext itself (not a repeating keyword) supplies the shift values after a short priming key. The autokey is genuinely Vigenère's invention, and it's mathematically stronger than the keyword-based cipher that bears his name today. Ironically, the cipher most associated with his name is not his — and the cipher that is his is rarely taught.

The reputation came first; the misattribution followed. Through the 17th, 18th, and into the 19th century, the keyword-based polyalphabetic cipher was widely regarded as unbreakable. The French nicknamed it le chiffre indéchiffrable ("the indecipherable cipher") and it was used for diplomatic, military, and (during the American Civil War) Confederate field communications. Edgar Allan Poe, writing in 1841 in Graham's Magazine, declared that no human ingenuity could devise a cipher human ingenuity could not resolve — but he was wrong about the Vigenère in particular. It survived almost 300 years before being publicly broken.

Why did the misattribution stick? Vigenère's 1586 book was widely circulated and influential; Bellaso's 1553 booklet was small and faded into obscurity. By the time European cryptographers in the 19th century were ready to name and codify the cipher, the historical record had defaulted to Vigenère. The correction has been well-known to cryptography historians for the better part of a century. David Kahn's canonical 1967 history The Codebreakers documents the misattribution in detail, but it has barely penetrated the popular understanding of the cipher. Most online cipher tools still credit Vigenère uncritically. The cipher's name is unlikely to change at this point, but the credit is worth getting right.

How Vigenère Was Broken: the Kasiski Examination

For nearly three centuries the Vigenère cipher resisted attack, until 1863, when the Prussian infantry major Friedrich Kasiski published Die Geheimschriften und die Dechiffrir-kunst ("Secret Writings and the Art of Deciphering"), the book that finally broke it. The method Kasiski described (now universally known as the Kasiski examination) exploits a structural weakness in any Vigenère cipher whose keyword is shorter than the message: repeated patterns.

If the plaintext contains a common short word (the, and, of, for) and that word appears multiple times in the message, and the keyword happens to align the same way with those repeated occurrences, the corresponding ciphertext will also repeat. The distance between two repeated ciphertext sequences is therefore a multiple of the keyword length. Find enough repeated sequences, take the greatest common factor of the distances, and you've recovered the length of the keyword. Once you know the keyword length, the Vigenère cipher reduces to a set of independent Caesar ciphers, one for each position in the keyword, each of which can be broken by letter-frequency analysis in seconds.

Charles Babbage, the English mathematician better known for designing mechanical computers, had actually solved the Vigenère cipher around 1854 — nine years before Kasiski's publication — in the course of breaking ciphers sent during the Crimean War. Babbage never published the technique, and the credit went to Kasiski. The episode is one of the more famous "published-credit-goes-to-the-second-person" stories in the history of science. David Kahn's The Codebreakers (1967) covers the Babbage–Kasiski story in depth and remains the standard reference for classical-cryptography history.

Kasiski's examination is no longer the only method available. William Friedman's index of coincidence (developed in the early 20th century) is a more statistical alternative, but Kasiski remains the introductory method taught in cryptography courses today.

When to Use the Vigenère Cipher

The Vigenère cipher is not used for serious modern encryption. Once the keyword length is known, the cipher is trivially broken, and modern computational cryptanalysis (statistical, dictionary-based, or brute-force) can determine the keyword length and the keyword itself in seconds for any reasonable message. Modern symmetric ciphers like AES use key spaces too large for any of these classical techniques to make a dent in.

Where the Vigenère cipher does still earn its keep:

  • Educational cryptography. Vigenère is the canonical introduction to polyalphabetic substitution, and it's where most students first see the relationship between key length, cryptanalysis, and security. It's standard fare in introductory cryptography courses at every level.
  • Puzzle design. Vigenère ciphers turn up regularly in escape rooms, geocaching puzzles, alternate-reality games (ARGs), treasure-hunt activities, and recreational cryptography challenges. Vigenère is also one of the ciphers used in the animated series Gravity Falls — fans who enjoyed decoding those messages might also be interested in the Bill Cipher Code Tool, which handles the show's symbol substitution cipher. For another classical puzzle cipher, try the Pigpen Cipher, which uses geometric symbols drawn from a grid.
  • Historical study and reconstruction. Reading and reproducing diplomatic, Civil War-era, or early-modern encrypted correspondence requires understanding the Vigenère cipher and its variants, since they dominated polyalphabetic communications for almost 300 years.

Frequently Asked Questions

Q: What is the Vigenère cipher? A: The Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to encrypt and decrypt text. Unlike the Caesar cipher (which shifts every letter by the same fixed amount), the Vigenère cipher shifts each letter by a different amount, with the shift values coming from the letters of the keyword. The keyword is repeated as many times as needed to match the length of the message. For an encyclopaedic overview, see the Wikipedia entry on the Vigenère cipher.

Q: Who invented the Vigenère cipher? A: Despite its name, the Vigenère cipher was not invented by Blaise de Vigenère. It was first described by the Italian cryptographer Giovan Battista Bellaso in his 1553 booklet. Vigenère's actual invention, described in his 1586 Traicté des Chiffres, was the autokey cipher. The misattribution arose because Vigenère's book was widely influential while Bellaso's faded into obscurity. See the 300-Year Misattribution section above for the full story, and the Crypto Museum's Vigenère entry for further background.

Q: How does the Vigenère cipher work? A: The Vigenère cipher encrypts each letter of a plaintext message by shifting it by an amount determined by the corresponding letter of a keyword. Convert each keyword letter to a number (A = 0, B = 1, C = 2, …, Z = 25); that number is the shift applied to the plaintext letter at that position. When the keyword is shorter than the message, it's repeated as many times as needed. Decryption applies the same shifts in reverse. See the How the Vigenère Cipher Works section above for the full worked example using "HELLO" + keyword "KEY" → "RIJVS."

Q: What's the difference between a Caesar cipher and a Vigenère cipher? A: The Caesar cipher is monoalphabetic — every letter in the message is shifted by the same fixed amount. The Vigenère cipher is polyalphabetic — each letter is shifted by a different amount, with the shift values coming from the letters of a keyword. Mathematically, the Caesar cipher is a special case of the Vigenère cipher: a Vigenère cipher with a one-letter keyword is identical to a Caesar shift. See the Vigenère and the Caesar Cipher section above for a full comparison table.

Q: How was the Vigenère cipher broken? A: The Vigenère cipher resisted public cryptanalysis for almost 300 years until Friedrich Kasiski published the method that breaks it in 1863. Kasiski's technique exploits repeated patterns in the ciphertext caused by the keyword repeating. Charles Babbage had actually solved it around 1854 but never published. See the Wikipedia entry on Kasiski examination for more.

Q: Is the Vigenère cipher secure today? A: No. The Vigenère cipher is not used for serious modern encryption. Once the keyword length is determined, the cipher reduces to a set of Caesar ciphers and is broken in seconds by a computer. Modern symmetric ciphers like AES use key spaces of 2128 or larger. The Vigenère cipher's modern use is educational and recreational. For a technical cryptanalysis, see Practical Cryptography's cryptanalysis guide.

Q: What is the Vigenère square (or tabula recta)? A: The Vigenère square — also called the tabula recta — is the 26×26 grid that traditionally accompanies the Vigenère cipher. Each row contains the alphabet shifted by one more position than the row above. To encode a letter by hand, find the plaintext letter along the top, find the keyword letter down the left side, and read off the ciphertext letter at the intersection. See the Vigenère Square section above for the visual reference, or Wikipedia's tabula recta entry for a typeset version.

Q: How do I implement a Vigenère cipher in Python? A: A clean Python implementation uses modular arithmetic:

def vigenere(text, key, decrypt=False):
    """Encrypt or decrypt a Vigenère cipher."""
    key = key.upper()
    result = []
    key_idx = 0
    for char in text:
        if char.isalpha():
            shift = ord(key[key_idx % len(key)]) - ord('A')
            if decrypt:
                shift = -shift
            base = ord('A') if char.isupper() else ord('a')
            result.append(chr((ord(char) - base + shift) % 26 + base))
            key_idx += 1
        else:
            result.append(char)
    return ''.join(result)

# Encrypt
print(vigenere("HELLO", "KEY"))                # → "RIJVS"

# Decrypt
print(vigenere("RIJVS", "KEY", decrypt=True))  # → "HELLO"

The same modular-arithmetic approach translates straightforwardly to any language. For a longer code example and pseudocode walkthrough, Khan Academy's cryptography course is a strong free resource.

Q: What if I don't know the key? A: If you have a Vigenère ciphertext and don't know the key, you can still recover both the key and the plaintext using Kasiski examination (described in the "How Vigenère Was Broken" section above). First determine the key length by finding repeated ciphertext patterns and computing the greatest common factor of the distances between them. Then use frequency analysis to recover each Caesar shift.

Q: What other ciphers are similar to Vigenère? A: Several classical ciphers belong to the same polyalphabetic family. The autokey cipher — Vigenère's actual 1586 invention — uses the plaintext itself to extend the keyword. The Beaufort cipher subtracts rather than adds shift values. The running-key cipher uses an entire body of text as the keyword. See Wikipedia's autokey cipher entry and the Beaufort cipher entry.

Q: How do you spell Vigenère (with or without the accent)? A: The historically correct spelling is Vigenère — with a grave accent on the second 'e' — because the cipher is named after the 16th-century French diplomat Blaise de Vigenère. English-language sources frequently drop the accent and write simply Vigenere cipher. Both spellings are widely accepted and refer to the same cipher. Pronunciation in French is approximately vee-zhuh-NAIR; in English it's most commonly anglicised to vij-uh-NAIR.

Related Tools

Feedback

How did you like using our decoder? Do you have some comments or suggestions? Click the Feedback button below to share your thoughts.

random sentence generator
Cite This Article

Pick a style below, and copy the text for your bibliography.

WORD SCRAMBLE. THE WORD FINDER located on the website https://www.thewordfinder.com/