Skip to content

Vigenere Cipher Decoder

Shift each letter by a repeating keyword. Decode turns LXFOPVEFRNHR with the key LEMON back into ATTACKATDAWN. Encode runs the shift the other way. Letters outside A to Z stay put, and the key does not move forward on those characters.

Result

Enter text and a keyword

How to Use

  1. 1 Paste the text.
  2. 2 Enter a keyword made of letters.
  3. 3 Choose Decode or Encode. Decode with LEMON turns LXFOPVEFRNHR into ATTACKATDAWN.

Example Output

  • Decode LXFOPVEFRNHR with LEMON to get ATTACKATDAWN.
  • Encode ATTACKATDAWN with LEMON to get LXFOPVEFRNHR.

About This Tool

This is the English Vigenere shift. The page does not guess a key, and it does not use a table other than A equals 0 through Z equals 25.

Using the Vigenere Cipher Decoder

This page shifts English letters by a repeating keyword. A is 0 and Z is 25. Decode subtracts the keyword letter from the text letter. Encode adds it. The keyword LEMON and the cipher LXFOPVEFRNHR decode to ATTACKATDAWN. Encoding ATTACKATDAWN with the same keyword returns LXFOPVEFRNHR. The keyword may be typed in any case. lemon and LEMON are the same key.

Characters that are not letters stay in place, and the keyword does not move forward on them. Uppercase stays uppercase and lowercase stays lowercase. The page does not guess a keyword. A keyword that contains a digit or a space is rejected. A blank text is rejected. The text may be at most 4000 characters, and the keyword may be at most 100 letters.

The headline is the shifted text when it is short enough to show. The lines name the keyword, the mode, and how many letters moved. Check the LEMON sample before you trust another key.

What the Shifted Text Is

The result is the letters after the keyword has been applied. ATTACKATDAWN is twelve letters with no spaces, because the sample cipher has no spaces. The keyword line shows the keyword in uppercase, even if you typed lemon. The mode line says Decode or Encode. The letters-shifted line counts letters and skips everything else.

A short result is also the headline. A long result keeps the full text in the body and uses a letter count as the headline once the text passes 80 characters. Copy the body when you need every character. The headline is a convenience for the sample, not a shorter cipher.

Reset clears the text toward empty and the keyword toward LEMON, with Decode selected. The previous result stays until the next run. A keyword of 123 is rejected because a keyword on this page is letters only.

How LEMON Moves through the Letters

LEMON repeats under the letters: L under the first, E under the second, M under the third, O under the fourth, N under the fifth, and then L again. Decode subtracts those positions. L minus L is A. The next letter of the cipher is X and the next key letter is E. X minus E, wrapped inside the alphabet, is T. The walk continues until ATTACKATDAWN is complete. Encode adds the same key letters, so the path from ATTACKATDAWN returns to LXFOPVEFRNHR.

The keyword does not advance on a space, a digit, or a punctuation mark. A space in the cipher stays a space, and the next letter uses the next unused keyword letter. That is why a spaced phrase and an unspaced phrase with the same letters do not always share a ciphertext.

A single-alphabet reversal is a different page. The Atbash Cipher Decoder swaps A with Z and needs no keyword. It will not turn LXFOPVEFRNHR into ATTACKATDAWN. Use it for Atbash. Use LEMON on this page for the Vigenere sample.

What the Page Does Not Break

The page does not search for a keyword. If the keyword is wrong, the letters still shift, and the result is not a warning. ATTACKATDAWN appears only for the matching key and the matching mode. A nearby key produces a different string. Compare it with the sample before you treat it as a recovered message.

The page does not use a tableau other than A equals 0 through Z equals 25. It does not shift digits. A 7 in the text stays a 7, and it does not consume a keyword letter. Accented letters are not in A to Z, so they stay in place as well.

There is no frequency chart and no dictionary check. The page will not tell you that ATTACKATDAWN is English. You can see that it is. A different ciphertext will not be scored.

Decode and Encode with LEMON

Choose Decode. Enter LXFOPVEFRNHR and the keyword LEMON. The headline is ATTACKATDAWN. The keyword line is LEMON. The mode line is Decode. The letters-shifted line is 12. Choose Encode, enter ATTACKATDAWN, and keep LEMON. The text is LXFOPVEFRNHR. The two runs are inverses of each other.

Type the keyword as lemon. The keyword line still shows LEMON, and the decode of LXFOPVEFRNHR is still ATTACKATDAWN. Enter a keyword of 123 and confirm the rejection. Enter a blank text and confirm the rejection.

A backward shift by one fixed number is a different page. The Cesarean Cipher Decoder moves every letter by the same count. Khoor with a shift of 3 is Hello. It does not use the keyword LEMON. Use it for that fixed shift. Use this page when the shift repeats a keyword.

Limits of the Keyword and the Text

The keyword must be 1 to 100 letters. A space inside the keyword is rejected rather than skipped. Remove the space or the page will not run. The text must contain something other than whitespace, and it must be at most 4000 characters. A longer paste is rejected rather than cut off.

Mode must be Decode or Encode. An empty mode is treated as Decode. Any other value is rejected. The sample uses Decode for LXFOPVEFRNHR and Encode for ATTACKATDAWN. Swapping those modes does not return the famous pair.

The alphabet does not grow. A letter outside A to Z is copied unchanged. If your message depends on those characters moving, this page is the wrong tool. The 26-letter shift is the whole method.

Common Mistakes

The usual miss is to advance the keyword on a space. This page does not. A cipher with spaces uses the keyword only on letters. Another miss is to expect Encode of LXFOPVEFRNHR to produce ATTACKATDAWN. That direction is Decode. Encode of the cipher moves the letters further away from the sample plaintext.

A third miss is to mix a fixed Caesar shift into the same note and call both results Vigenere. A fixed shift has no repeating keyword. LEMON is what makes this sample Vigenere.

Joining broken lines is a different page. The Remove Line Breaks tool joins or spaces lines of plain text. It does not subtract a keyword. Use it when the only problem is a line break. Use this page when the letters themselves must move.

Reading ATTACKATDAWN in a Note

Copy the result, the keyword, and the mode. ATTACKATDAWN without LEMON and without Decode can be this sample or a coincidence from another key. The three together rebuild the run. The letters-shifted line should say 12 for this cipher.

Say that non-letters were left in place and did not advance the key. A reader who strips spaces before checking will build a different alignment if the original text had spaces. The sample has no spaces, so the alignment is the letters in order.

Keep the case of the ciphertext in the note if it mattered. The sample is uppercase throughout. A lowercase cipher stays lowercase in the result.

Rebuilding the Sample

Decode LXFOPVEFRNHR with LEMON and confirm ATTACKATDAWN. Encode ATTACKATDAWN with LEMON and confirm LXFOPVEFRNHR. Type the keyword in lowercase and confirm the decode still matches. Enter a keyword of 123 and confirm the rejection. Enter a blank text and confirm the rejection.

Counting sentences is a different page. The Sentence Counter counts sentences in plain text. It does not apply LEMON. Use it after you have a decoded paragraph. Use this page to produce the decoded letters.

File the mode with the keyword. A later check that encodes when you meant to decode will not show ATTACKATDAWN, and the keyword will look wrong when the mode was the mistake.

Checking a New Keyword

Confirm LEMON before you change the keyword. Decode should show ATTACKATDAWN and encode of that plaintext should show LXFOPVEFRNHR. Then change only the keyword. The output should change. If it does not, the field still holds LEMON.

Keep the keyword to letters. Keep the text within 4000 characters. A space in the text is allowed. A space in the keyword is not.

Raised characters are a different transformation. The Superscript Generator lifts digits and a few signs. It does not repeat a keyword across letters. Use it for a superscript. Use this page for Vigenere.

What the Fields Accept

Text is required and may include spaces and punctuation. Keyword is 1 to 100 letters. Mode is Decode or Encode. A blank keyword is rejected. A keyword with a digit is rejected. A shift number is not a field on this page. The repeating keyword replaces a single shift.

The headline is the shifted text when it fits. The lines are the keyword, the mode, and the count of letters shifted. Copy returns the shifted text. There is no alphabet chart image.

LEMON is five letters. It repeats for every letter of a longer message. You do not need to type LEMONLEMON yourself. The page repeats it, and it skips the repeat forward only when the character is a letter.

Why the Two Samples Are Inverses

Start with ATTACKATDAWN and add LEMON, letter by letter, modulo 26. The first A plus L is L. The first T plus E is X. Continue, and the cipher is LXFOPVEFRNHR. Start from that cipher and subtract the same keyword. Each addition is undone, and the plaintext returns. The page does both directions. Decode is the subtraction. Encode is the addition. The sample pair is the check that both directions are wired to the same alphabet.

If you decode twice, you do not return to the cipher. A second decode subtracts LEMON again. Only the opposite mode undoes the first run. That is the practical test after the famous pair: encode the decoded sample and see the cipher return. If a space was introduced by hand between the two runs, the keyword alignment changes and the cipher will not match. Remove the space or expect a different string.

Walking LEMON Across ATTACKATDAWN

The sample key is LEMON and the sample plaintext is ATTACKATDAWN. Encode adds the key. L is 11, so A becomes L. E is 4, so T becomes X. M is 12, so T becomes F. O is 14, so A becomes O. N is 13, so C becomes P. The key then repeats. The next letter of the plaintext is K, and the next key letter is L again, so K becomes V. Continue that way and the ciphertext is LXFOPVEFRNHR. Decode runs the same key backward. LXFOPVEFRNHR with LEMON returns ATTACKATDAWN. The headline is that plaintext when it fits in 80 characters.

Checking the Decoder

Decode LXFOPVEFRNHR with LEMON and confirm ATTACKATDAWN. Encode ATTACKATDAWN with LEMON and confirm LXFOPVEFRNHR. Enter a keyword of 123 and confirm the rejection. When the pair reverses and a non-letter keyword is refused, the page is applying the repeating English shift it describes.

Frequently Asked Questions

What does LXFOPVEFRNHR decode to with LEMON?

ATTACKATDAWN. The mode is Decode.

What does ATTACKATDAWN encode to with LEMON?

LXFOPVEFRNHR. Encode is the opposite of Decode.

Does the keyword care about case?

No. lemon and LEMON are the same keyword. The result keeps the case of the text letters.

Does the keyword advance on a space?

No. Spaces and other non-letters stay in place and do not consume a keyword letter.

Will the page guess the keyword?

No. You enter the keyword. A wrong keyword still shifts the letters.

How long can the keyword be?

From 1 to 100 letters. Digits and spaces in the keyword are rejected.

How long can the text be?

At most 4000 characters. A blank text is rejected.

What does an empty mode do?

It is treated as Decode.

Does a second decode undo the first?

No. Use Encode to undo Decode, or Decode to undo Encode, with the same keyword.

Are digits shifted?

No. Digits stay where they are.

What do the lines show?

The keyword, the mode, and how many letters were shifted.

What does reset restore?

The keyword returns toward LEMON and the mode toward Decode. The previous result stays until the next run.