FormatterHQ

Vigenère Cipher

Encrypt and decrypt messages with the classic Vigenère keyword cipher. Letters shift by the matching keyword letter; case, spaces and punctuation stay as they are.

Input TEXT
Output TEXT
Ready.

How to use the Vigenère Cipher

  1. Type your message into the input box.
  2. Enter a Keyword made of letters (the default is LEMON). Spaces, digits and symbols in the keyword are ignored.
  3. Click Encrypt to encode the text, or Decrypt to recover the original with the same keyword.
  4. Copy the result from the output panel.

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 N is 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.

Frequently asked questions

How do I decrypt a Vigenère cipher?
Paste the ciphertext, enter the same keyword that was used to encrypt it, and click Decrypt. The keyword is case-insensitive, and any non-letters in it are ignored.
Can this tool break a Vigenère cipher without the key?
No, it performs encryption and decryption with a known keyword only. Breaking an unknown key requires estimating the key length first, for example with the Kasiski examination, and then solving each column like a Caesar shift.
Why is my decrypted text still garbled?
Either the keyword is wrong or the ciphertext was produced by a tool that also counts spaces or punctuation when advancing the key. This tool advances the keyword on letters only, which is the most common convention.
What is the difference between Vigenère and Caesar?
A Caesar cipher uses one shift for every letter. Vigenère uses a sequence of shifts taken from a keyword, so the same plaintext letter can become different ciphertext letters depending on its position.

Last updated October 3, 2026

Related tools