Vigenère Cipher

Free Vigenère cipher tool. Encrypt and decrypt text with a polyalphabetic keyword cipher, with case and punctuation preserved. Supports any alphabetic keyword.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter text and a keyword above.

How vigenère cipher works

The Vigenere cipher is a polyalphabetic substitution cipher invented in the 16th century and once called 'le chiffre indechiffrable' (the indecipherable cipher). Instead of a single fixed shift like the Caesar cipher, it uses a repeating keyword: each letter of the plaintext is shifted by the value of the corresponding keyword letter (A=0, B=1, ..., Z=25).

To encrypt, the keyword is repeated to match the length of the message, and each plaintext letter is shifted forward by its keyword letter's position. To decrypt, each letter is shifted back by the same amount. Only letters are shifted (case is preserved), and non-letters such as spaces, numbers and punctuation are skipped and do not advance the keyword.

Enter your text, type a keyword using only letters, and pick encrypt or decrypt. The tool repeats the keyword across your message and preserves case and punctuation. The Vigenere cipher resisted casual cracking for roughly 300 years, but it is broken by Kasiski examination and key-length analysis — use it for puzzles, games and learning, never for real security.

Frequently asked questions

What is a Vigenere cipher?
A polyalphabetic substitution cipher that uses a repeating keyword. Each plaintext letter is shifted by the value of the matching keyword letter (A=0 ... Z=25), so the same plaintext letter can map to different ciphertext letters depending on position.
How is the keyword used?
The keyword is repeated to cover every letter of the message. For 'HELLO' with key 'AB', the shifts are A,B,A,B,A. Only letters advance the keyword; spaces and punctuation are skipped.
How is decryption done?
By shifting each ciphertext letter back by the keyword letter's value, the reverse of encryption. With the correct keyword the original text is recovered exactly, including case and punctuation.
Is the Vigenere cipher secure?
No. It was considered unbreakable for centuries, but repeated-key weaknesses let analysts find the key length (Kasiski test) and then break each sub-key by frequency analysis. Use it only for puzzles, games and learning — never to protect real data.