Vigenère Cipher — Online Decoder & Encoder

The Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to apply different Caesar shifts to each letter. Once called "le chiffre indéchiffrable" (the undecipherable cipher), it can now be decoded using Kasiski examination and frequency analysis. Use this free Vigenère cipher decoder and encoder to encrypt, decrypt, and automatically solve Vigenère-encrypted messages.

"HELLO""RIJVS"(Key: KEY)
Result
0 characters
None

Settings

Character Set

All processing happens in your browser — no data is sent to any server

Vigenère Tabula Recta (Preview)

The tabula recta is the 26×26 grid used for Vigenère encryption. Find the row matching the key letter and the column matching the plaintext letter — the intersection is the ciphertext letter.

ABCDEF
AABCDEF
BBCDEFG
CCDEFGH
DDEFGHI
EEFGHIJ
FFGHIJK

Showing 6×6 preview of the full 26×26 Vigenère table

Frequently Asked Questions About Vigenere Cipher

What is the Vigenere cipher and how does it work?

The Vigenere cipher is a polyalphabetic substitution cipher invented by Blaise de Vigenere in the 16th century. It uses a keyword where each letter determines a different shift value (A=0, B=1, C=2, etc.). The keyword repeats to match the length of the plaintext, and each plaintext letter is shifted by the amount indicated by the corresponding keyword letter. For example, with keyword 'KEY', the first letter shifts by 10 (K), the second by 4 (E), the third by 24 (Y), then the pattern repeats.

How do you break a Vigenere cipher?

Breaking a Vigenere cipher involves two steps: first, determine the keyword length using the Kasiski examination (finding repeated sequences) or the Index of Coincidence method; second, once the key length is known, treat each position as a separate Caesar cipher and use frequency analysis on each group of letters. Our auto-solver tool performs these steps automatically.

What is a tabula recta in Vigenere cipher?

The tabula recta (also called a Vigenere table or Vigenere square) is a 26×26 grid of alphabets, where each row is shifted one position to the left compared to the row above. To encrypt a letter, find the row corresponding to the keyword letter and the column corresponding to the plaintext letter — the intersection gives the ciphertext letter. Our tool includes an interactive tabula recta visualization.

Why was the Vigenere cipher called "le chiffre indéchiffrable"?

The Vigenere cipher was called "le chiffre indéchiffrable" (the indecipherable cipher) because it resisted all attempts at cryptanalysis for over 300 years after its invention. Its polyalphabetic nature defeated the frequency analysis techniques that could easily break monoalphabetic ciphers like the Caesar cipher. It was not broken until Charles Babbage and Friedrich Kasiski independently developed methods in the mid-19th century.

What is the difference between Vigenere and Caesar cipher?

The Caesar cipher is a monoalphabetic cipher that shifts every letter by the same fixed amount, making it vulnerable to frequency analysis. The Vigenere cipher is polyalphabetic, using a keyword to apply different shift values to different positions in the text. This means the same plaintext letter can encrypt to different ciphertext letters depending on its position, making frequency analysis much more difficult.

How do you choose a good Vigenere cipher key?

A strong Vigenere cipher key should be long, random, and avoid dictionary words or repeating patterns. Longer keys increase the number of distinct Caesar shifts applied, making frequency analysis harder. Ideally, the key should be at least as long as the plaintext — when the key is truly random and equal in length to the message, the Vigenere cipher becomes a one-time pad, which is theoretically unbreakable.

Is the Vigenere cipher still secure today?

No, the Vigenere cipher is not secure for modern use. It can be broken using the Kasiski examination and frequency analysis techniques developed in the 1800s. Modern computers can break it almost instantly. However, the Vigenere cipher remains an important educational tool for understanding polyalphabetic encryption and the foundations of modern cryptography.

Who actually invented the Vigenere cipher?

Despite its name, the Vigenere cipher was first described by Giovan Battista Bellaso in his 1553 booklet "La cifra del. Sig. Giovan Battista Bellaso." Blaise de Vigenère later published a stronger autokey variant in 1586, but over the centuries historians incorrectly attributed Bellaso's simpler cipher to Vigenère. This misattribution became so entrenched that the name stuck. The historical confusion was not widely corrected until David Kahn's 1967 book "The Codebreakers" clarified the distinction between the two systems.

What does polyalphabetic mean in cryptography?

Polyalphabetic means "using multiple alphabets." In a polyalphabetic cipher like Vigenere, each letter in the plaintext can be encrypted using a different substitution alphabet, depending on its position and the keyword. This contrasts with monoalphabetic ciphers (like Caesar) that use a single fixed alphabet for every letter. The advantage of polyalphabetic encryption is that the same plaintext letter can produce different ciphertext letters at different positions, which defeats simple frequency analysis. For example, in Vigenere with keyword "KEY", the letter 'A' at position 1 encrypts as 'K', but 'A' at position 2 encrypts as 'E'.

How to decode Vigenère cipher without the key?

To decode a Vigenère cipher without the key, use a two-step process. First, determine the key length using Kasiski examination (finding repeated sequences in the ciphertext and calculating the GCD of their distances) or the Index of Coincidence method. Second, once you know the key length, split the ciphertext into groups and apply frequency analysis to each group as if it were a separate Caesar cipher. Our auto-solver performs these steps automatically — just paste your ciphertext and click solve.

What is the Vigenère cipher table (tabula recta) used for?

The Vigenère cipher table, also called the tabula recta or Vigenère square, is a 26×26 grid where each row is a Caesar-shifted alphabet. To encrypt: find the row matching the keyword letter and the column matching the plaintext letter — their intersection is the ciphertext letter. To decrypt: find the row matching the keyword letter, then locate the ciphertext letter in that row — the column header is the plaintext letter. Our interactive table lets you trace encryption paths visually.

How is Vigenère cipher different from a one-time pad?

The Vigenère cipher and the one-time pad use the same encryption algorithm, but differ in key management. Vigenère uses a short keyword that repeats, creating patterns that can be exploited by Kasiski examination and frequency analysis. A one-time pad uses a truly random key at least as long as the message, never reused — making it theoretically unbreakable. The Vigenère cipher is essentially a one-time pad with a repeating key, and that repetition is its fundamental weakness.

What Is the Vigenère Cipher?

The Vigenère cipher is a polyalphabetic substitution cipher that encrypts text by applying a different Caesar shift to each letter based on a repeating keyword. If the keyword is "KEY", the first letter shifts by 10 (K = 10), the second by 4 (E = 4), the third by 24 (Y = 24), then the pattern repeats. This means the same plaintext letter can encrypt to different ciphertext letters depending on its position — the defining feature that separates polyalphabetic ciphers from monoalphabetic ones like Caesar.

For over 300 years, from its invention in 1553 to its first published cryptanalysis in 1863, the Vigenère cipher was called "le chiffre indéchiffrable" — the indecipherable cipher. It defeated every known attack of its era by flattening the letter frequency distribution that makes single-alphabet ciphers trivially breakable. It was not until Friedrich Kasiski and independently Charles Babbage developed new statistical techniques that the cipher finally fell.

How the Vigenère Cipher Works

Encryption Formula

For each plaintext letter at position i, the encryption formula is:

Cᵢ = (Pᵢ + Kᵢ) mod 26

Where Pᵢ is the plaintext letter's position (A = 0, B = 1, … Z = 25), Kᵢ is the corresponding keyword letter's position, and mod 26 wraps the result within the alphabet.

Decryption Formula

Pᵢ = (Cᵢ − Kᵢ + 26) mod 26

Step-by-Step Example

Encrypt ATTACK AT DAWN with the keyword LEMON:

PositionPlaintextKey LetterP + Kmod 26Ciphertext
1A (0)L (11)1111L
2T (19)E (4)2323X
3T (19)M (12)315F
4A (0)O (14)1414O
5C (2)N (13)1515P
6K (10)L (11)2121V
7A (0)E (4)44E
8T (19)M (12)315F
9D (3)O (14)1717R
10A (0)N (13)1313N
11W (22)L (11)337H
12N (13)E (4)1717R

Result: ATTACK AT DAWN → LXFOPV EF RNHR

Notice that the two T's at positions 2 and 3 encrypt to different letters (X and F) because they align with different keyword letters (E and M). Similarly, the three A's at positions 1, 4, and 7 become L, O, and E respectively. This varying substitution is exactly what makes frequency analysis ineffective against polyalphabetic ciphers.

The Tabula Recta

The tabula recta (also called the Vigenère square or Vigenère table) is the 26×26 grid traditionally used to perform Vigenère encryption by hand. Each row represents a Caesar cipher with a different shift value — row A is shift 0, row B is shift 1, and so on.

To encrypt a letter using the tabula recta:

  1. Find the row corresponding to the keyword letter.
  2. Find the column corresponding to the plaintext letter.
  3. The letter at the intersection is the ciphertext letter.

The preview table on this page shows a 6×6 portion of the full grid. Explore the complete 26×26 tabula recta on our interactive Vigenère table page, where you can click any cell to see the encryption relationship.

How to Recognize Vigenère Ciphertext

Before attempting to break a cipher, it helps to identify whether you are dealing with Vigenère encryption. Several characteristics distinguish Vigenère ciphertext from other cipher types:

  • Letters only, with preserved word boundaries. Like Caesar, Vigenère traditionally encrypts only alphabetic characters, leaving spaces and punctuation intact. Word lengths match the original plaintext.
  • Flattened but not uniform letter frequencies. In a Caesar cipher, the frequency distribution looks like English but shifted. In Vigenère ciphertext, the distribution is significantly flatter — no single letter dominates — but it is not completely uniform either (which would suggest a one-time pad or random text).
  • Index of Coincidence between 0.04 and 0.05. The IC of Vigenère ciphertext typically falls between the English value (~0.067) and the random value (~0.038), depending on key length. An IC in this intermediate range is a strong indicator of polyalphabetic substitution.
  • Repeated sequences at regular intervals. If you spot identical 3+ letter sequences appearing at distances that share a common factor, the text is very likely Vigenère-encrypted (this is the basis of Kasiski analysis).

The Cipher Identifier tool on this site uses these characteristics to automatically detect Vigenère encryption and estimate the key length.

Where You'll Encounter the Vigenère Cipher

Despite being centuries old, the Vigenère cipher appears frequently in modern contexts:

  • CTF competitions. Cybersecurity Capture The Flag challenges routinely use Vigenère encryption at intermediate difficulty levels. Competitors must identify the cipher type, determine the key length, and recover the key to obtain the flag.
  • Escape rooms and puzzle hunts. Vigenère is a popular choice for multi-step puzzles because it requires both a key and ciphertext, allowing puzzle designers to hide the keyword as a separate clue.
  • Cryptography courses. The Vigenère cipher is the standard example used to teach polyalphabetic substitution, key management, Kasiski analysis, and the Index of Coincidence in university-level cryptography and information security courses.
  • Pop culture. The Vigenère cipher has appeared in the TV series Gravity Falls, the video game Destiny 2, and numerous detective novels. The animated show Gravity Falls famously used Vigenère-encrypted messages in its end credits, with the keyword hidden in each episode.
  • Historical reenactment. Civil War enthusiasts and educational programs use replica Confederate cipher disks to demonstrate period-accurate encryption techniques.

The Vigenère cipher is part of a family of polyalphabetic systems that evolved from the same core idea:

  • Beaufort Cipher — A reciprocal variant where the key letter is subtracted from a fixed position rather than added. Beaufort encryption and decryption use the same operation.
  • Autokey Cipher — Vigenère's own invention: the key starts with a primer and then appends the plaintext itself, eliminating the repeating-key weakness.
  • Gronsfeld Cipher — A Vigenère variant that restricts the key to digits (0–9), reducing the per-position keyspace from 26 to 10.
  • Running Key Cipher — Uses a long passage of text (e.g., a book page) as the key, approaching one-time pad security without requiring a truly random key.
  • Trithemius Cipher — The predecessor that shifts each letter progressively (A=0, B=1, C=2, …) without a secret key. Bellaso's innovation was replacing this fixed progression with a secret keyword.
  • Porta Cipher — A reciprocal digraphic cipher using 13 alphabets, designed as a self-inverse system.
  • Quagmire Cipher — A family of four variants that combine keyword-mixed alphabets with Vigenère-style polyalphabetic shifting.
  • Alberti Cipher — The first polyalphabetic cipher, invented by Leon Battista Alberti in the 1460s using a rotating cipher disk. Alberti's concept of changing alphabets during encryption was the precursor to all subsequent polyalphabetic systems, including Bellaso's keyword method.

The evolution from Alberti's cipher disk (1460s) → Trithemius's progressive shift (1508) → Bellaso's keyword method (1553) → Vigenère's autokey system (1586) represents one of the most important development arcs in the history of cryptography, each step addressing a weakness of the previous design.

Further Reading

Explore Vigenère cipher history, cryptanalysis techniques, and code implementations: