Boneyard Tools

Vigenere Cipher Encoder and Decoder

Encode or decode a message with the classic Vigenere cipher. Type your text and a keyword, then pick encode or decode. Letters are shifted by the keyword while case is kept and spaces, digits and punctuation pass straight through.

How to use the Vigenere cipher

  1. Type or paste your text into the box.
  2. Enter a keyword made of letters, then choose Encode or Decode.
  3. Read the result update live and copy it.

Examples

Encode with a keyword

Text: HELLO, key: KEY, mode: Encode
RIJVS

Decode it back

Text: RIJVS, key: KEY, mode: Decode
HELLO

The classic textbook example

Text: ATTACKATDAWN, key: LEMON, mode: Encode
LXFOPVEFRNHR

Frequently asked questions

How does the Vigenere cipher work?

Each letter is shifted by an amount taken from the next letter of the keyword (A shifts 0, B shifts 1, and so on). The keyword repeats across the message, so the same plaintext letter can map to different letters depending on its position. To decode, the same shifts are subtracted with the same keyword.

What happens to spaces, numbers and punctuation?

Only the letters A-Z and a-z are shifted, and their case is preserved. Spaces, digits, punctuation and line breaks pass through unchanged, and they do not advance the keyword, so the keyword only lines up with the letters it actually transforms.

Does the case of my keyword matter?

No. The keyword is read for its letters only, so KEY, Key and key all produce the same shifts. Any non-letters in the keyword are ignored when deriving the shift amounts.

Is the Vigenere cipher secure encryption?

No. This is a classical cipher meant for puzzles, history and learning, not for protecting secrets. It was broken in the 1800s and is easy to crack with frequency analysis, especially with a short keyword. For real protection use a tool that applies modern, password-based encryption such as AES.

Is my text private?

Yes. The encoding and decoding run entirely in your browser. Your text and keyword are never uploaded to a server and nothing is stored.

Why do I need a keyword with at least one letter?

The shift amounts come from the letters in the keyword, so a keyword with no letters (empty or only digits and symbols) gives the cipher nothing to work with. The tool asks for at least one letter and otherwise reports an error instead of returning the text unchanged.

Related tools