Skip to main content
Substitution ciphers100% FreeInstant

Vigenère Cipher: Encrypt and Decrypt with a Key

This free Vigenère cipher tool encrypts and decrypts text using a keyword. Each letter of the key sets a different Caesar shift, which makes the cipher much harder to break than a single shift.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

The Vigenère cipher uses a keyword instead of a single shift. A key such as LEMON means that the first letter is shifted by L (11), the second by E (4), the third by M (12), and so on, then the key repeats.

Enter text and a keyword, then choose to encrypt or decrypt.

How to Use This Tool

  1. Type or paste your text.
  2. Enter a keyword made of letters.
  3. Choose encrypt or decrypt.
  4. Press Run and copy the result.

How the Calculation Works

Each key letter is converted to a number from 0 to 25. For encryption, the message letter plus the key number, modulo 26, gives the cipher letter. For decryption the key number is subtracted. Only letters use up the key, and case is kept.

Worked Example

Encrypting ATTACKATDAWN with the key LEMON gives LXFOPVEFRNHR, the classic test example.

Common Uses

  • Puzzles and escape rooms.
  • Teaching cryptography.
  • Geocaching.
  • Studying historical ciphers.

Tips and Common Mistakes

  • A longer key is harder to break.
  • The key must contain at least one letter.
  • Use the Caesar tool for a single shift.

Next, you may need the Caesar cipher, affine cipher, Playfair cipher, XOR cipher.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

The keyword is repeated along the message. Each letter of the message is shifted by the position in the alphabet of the matching key letter.
For about 300 years nobody published a way to break it, because a letter is not always encrypted the same way. It was broken in the 1800s with key-length analysis.
They are kept and do not use up a key letter, so the key stays aligned with the letters.
No. Computers break it easily. Use it for puzzles and learning only.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.