Vigenere Cipher

Encrypt and decrypt text using the Vigenere cipher with a keyword.

The Vigenere Cipher tool encrypts and decrypts text using a polyalphabetic substitution cipher driven by a keyword. Each letter in the plaintext is shifted by a different amount determined by the corresponding letter in the repeating keyword. It preserves letter case, passes non-alphabetic characters through unchanged, and includes an optional visualization of the full 26x26 Vigenere table.

Loading...
Your data stays in your browser
Tutorial

How to Use

1
1

Enter your plaintext or ciphertext

Type or paste the text you want to encrypt or decrypt into the input text area at the top of the tool.

2
2

Set the keyword

Enter a keyword using only letters. The keyword repeats across the text to determine the shift for each character.

3
3

Toggle mode and copy result

Switch between encrypt and decrypt mode, optionally view the Vigenere table, then copy the transformed output to your clipboard.

Guide

Complete Guide to the Vigenere Cipher

History of the Vigenere Cipher

The Vigenere cipher was first described by Giovan Battista Bellaso in 1553 and later misattributed to Blaise de Vigenere who published a stronger autokey variant in 1586. For three centuries it was known as 'le chiffre indechiffrable' — the unbreakable cipher. It was not until the 1860s that Friedrich Kasiski and Charles Babbage independently developed methods to crack it by exploiting repeating keyword patterns.

How the Algorithm Works

The Vigenere cipher applies a different Caesar shift to each letter based on the corresponding keyword letter. If the keyword letter is B (position 1), the plaintext letter shifts by 1. The keyword repeats cyclically to match the plaintext length. Mathematically, encryption is E = (P + K) mod 26, and decryption is D = (E - K + 26) mod 26, where P is the plaintext position, K is the keyword position, and E is the encrypted position.

Breaking the Vigenere Cipher

The Kasiski examination finds repeated sequences in the ciphertext to determine likely keyword lengths. Once the keyword length is known, the cipher reduces to multiple independent Caesar ciphers that can each be solved using frequency analysis. The Index of Coincidence method provides another statistical approach by measuring how likely it is that two random ciphertext letters are the same, helping confirm keyword length.

From Vigenere to Modern Encryption

The Vigenere cipher represents an important step from monoalphabetic to polyalphabetic encryption. Its principles influenced the development of more complex cipher machines, including the Enigma machine and rotor-based devices. Modern stream ciphers share the concept of combining plaintext with a key stream. Understanding the Vigenere cipher provides essential insight into how key-based encryption evolved into the AES and RSA systems used today.
Examples

Worked Examples

Example: Encrypting HELLO with keyword KEY

Given: Plaintext 'HELLO' and keyword 'KEY'

1

Step 1: Repeat keyword to match length: K-E-Y-K-E

2

Step 2: H(7) + K(10) = R(17), E(4) + E(4) = I(8), L(11) + Y(24) = J(9)

3

Step 3: L(11) + K(10) = V(21), O(14) + E(4) = S(18)

Result: 'HELLO' encrypts to 'RIJVS' with keyword 'KEY'

Example: Decrypting RIJVS with keyword KEY

Given: Ciphertext 'RIJVS' and keyword 'KEY'

1

Step 1: Repeat keyword to match length: K-E-Y-K-E

2

Step 2: R(17) - K(10) = H(7), I(8) - E(4) = E(4), J(9) - Y(24) = L(11)

3

Step 3: V(21) - K(10) = L(11), S(18) - E(4) = O(14)

Result: 'RIJVS' decrypts to 'HELLO' with keyword 'KEY'

Use Cases

Use Cases

Secure message exchange with shared keyword

Exchange private messages with a friend by agreeing on a secret keyword beforehand. Unlike the Caesar cipher which has only 25 keys, the Vigenere cipher's security grows with keyword length, making it much harder to crack without the keyword.

Studying polyalphabetic encryption

Use the interactive Vigenere table to visualize how different keyword letters create different substitution alphabets. This hands-on approach makes it easier to understand why polyalphabetic ciphers resisted cryptanalysis for centuries until Babbage and Kasiski broke them.

Creating challenging puzzle games

Design sophisticated escape room or treasure hunt clues that require participants to discover both the ciphertext and the keyword. The added complexity of a keyword makes Vigenere puzzles more engaging than simple substitution ciphers for experienced puzzle enthusiasts.

Frequently Asked Questions

?What is the Vigenere cipher?

It is a polyalphabetic substitution cipher that uses a keyword to shift each letter by a different amount, making it stronger than simple Caesar ciphers.

?How does the keyword work?

The keyword repeats to match the text length. Each keyword letter determines the shift for the corresponding plaintext letter using alphabetic position values.

?Is the Vigenere cipher secure?

Not by modern standards. It was considered unbreakable for centuries but can be cracked using Kasiski examination and frequency analysis techniques.

?Does it preserve letter case?

Yes. Uppercase letters remain uppercase and lowercase letters remain lowercase after encryption. Non-alphabetic characters pass through unchanged.

?What happens to numbers and spaces?

Numbers, spaces, and all non-alphabetic characters are passed through without modification. Only letters A through Z are shifted by the cipher.

?Is this tool free to use?

Yes, it is completely free with no usage limits. Encrypt and decrypt as many messages as you want without any account registration.

?Is my data private when using this tool?

Yes. All encryption and decryption processing happens locally in your browser. No text or keywords are sent to any external server.

?Who invented the Vigenere cipher?

It is named after Blaise de Vigenere, though Giovan Battista Bellaso first described it in 1553. Vigenere built upon and popularized the concept.

Related Tools

Help us improve

How do you like this tool?

Every tool on Kitmul is built from real user requests. Your rating and suggestions help us fix bugs, add missing features and build the tools you actually need.

Rate this tool

Tap a star to tell us how useful this tool was for you.

Suggest an improvement or report a bug

Missing a feature? Found a bug? Have an idea? Tell us and we'll look into it.

Recommended Reading

Recommended Books on Classical Cryptography & Codebreaking

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Recommended Products for Classical Cipher Enthusiasts

As an Amazon Associate we earn from qualifying purchases.

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked