Vigenère cipher encoder and decoder
The Vigenère cipher encrypts text with a keyword instead of a single shift. Each letter of the message is shifted by the alphabet position of the corresponding keyword letter (A = 0, B = 1 … Z = 25), and the keyword repeats as often as needed. This tool performs both directions and keeps your formatting, so the output has the same capitalization, spacing and punctuation as the input.
Example
With the textbook message and the keyword LEMON:
Plaintext: Attack at dawn
Keyword: LEMONL EM ONLE
Ciphertext: Lxfopv ef rnhr
A shifted by L (11) gives L, t shifted by E (4) gives x, and so on. Notice that the keyword advances only on letters: the spaces do not consume keyword letters. Clicking Decrypt with the same keyword turns Lxfopv ef rnhr back into Attack at dawn, and the keyword is not case-sensitive.
History
The method was published by Giovan Battista Bellaso in 1553 and later misattributed to the French diplomat Blaise de Vigenère. For roughly three centuries it had a reputation as "le chiffre indéchiffrable", the unbreakable cipher, because simple frequency analysis does not work when each letter can shift by a different amount.
Is the Vigenère cipher secure?
No. In the 19th century, Charles Babbage and Friedrich Kasiski independently showed how to find the keyword length from repeated patterns in the ciphertext. Once the length is known, the message splits into several ordinary Caesar ciphers, each easy to break. Short keywords and long messages make this especially quick. Use this tool for puzzles, classroom exercises and escape-room clues, not to protect real secrets.
Tips and edge cases
- A keyword of a single letter turns the Vigenère cipher into a Caesar cipher; the keyword
Nis equivalent to ROT13. - The letter A in a keyword means a shift of zero, so a keyword of all A's leaves text unchanged.
- Only the letters A to Z are encrypted. Digits and accented characters pass through, which can reveal structure in the message.
- If the keyword contains no letters at all, the tool asks you to enter one.
For another classical cipher that needs no key, compare the Atbash cipher.
Privacy
Encryption and decryption run in your browser, and nothing is uploaded while you work. If you click Save & Share, the link stores the text in the input box on our server; the keyword is never stored in a shared link.