Keyword Cipher (Vigenère)

Pick a secret keyword and the cipher walks through it letter-by-letter as it shifts your message — repeating from the start of the key when it runs out. Numbers, spaces, and punctuation pass through unchanged.

Case is ignored. Non-letters are not allowed in the key.
Try a key:

What is the Keyword (Vigenère) Cipher?

The keyword cipher — also known as the Vigenère cipher — is a classical encryption method that uses a secret keyword to shift each letter of your message by a different amount. Where the simpler Caesar cipher shifts every letter by the same amount, the Vigenère cipher rotates through the letters of your keyword to vary the shift. This makes it dramatically harder to break by hand. Invented in the 16th century, it was famously called le chiffre indéchiffrable ("the indecipherable cipher") and resisted serious attack for nearly 300 years before Friedrich Kasiski published a successful method in 1863.

How the Keyword Walk Works

Suppose your keyword is soup. The cipher walks through your message one letter at a time, and at each letter it uses the next letter of the keyword as the shift amount:

Spaces, numbers, and punctuation are passed through unchanged and do not consume a keyword letter. Capitalization in your message is preserved.

How to Use This Tool

  1. Pick a mode — Encode to scramble a plaintext, Decode to reverse a previously encoded message using the same keyword.
  2. Type a keyword — letters only, any length, case is ignored. Longer and less-predictable keywords are stronger.
  3. Type your message — paste or type into the message box. Letters are shifted per the keyword walk; everything else passes through.
  4. Click Convert — the result appears instantly and can be copied or downloaded.

Example

With keyword soup, encoding the message:

Attack at dawn!

produces:

Shnpuy ui voqc!

To recover the original message, switch to Decode and use the same keyword soup.

Common Use Cases

Tips for Choosing a Strong Keyword

Frequently Asked Questions

Is the Vigenère cipher secure?

No. While much stronger than a Caesar cipher, the Vigenère cipher has been breakable since the 19th century. It is fun and instructive — but never use it to protect real secrets. For genuine encryption, use a modern algorithm like AES via a trusted password manager or encrypted messenger.

What characters are allowed in the keyword?

Letters only (A–Z, case-insensitive). Spaces, numbers, and punctuation are not valid keyword characters and the tool will warn you.

What happens to numbers, spaces, and punctuation in the message?

They pass through unchanged and do not advance the keyword. Only alphabetic characters are shifted, which is the standard Vigenère behavior and keeps the output readable.

Does the keyword need to match the message length?

No — the keyword automatically repeats from the start once it has been used up. A 4-letter keyword can encode a paragraph just fine.

Does this tool send my message to a server?

No. All encryption happens entirely in your browser using local JavaScript. Nothing is uploaded, logged, or stored.