Caesar Cipher Decoder with Key

code
Loading feedback…

Caesar Cipher Decoder with Key: paste the coded message, type the key (a number, a letter or a keyword) and read the decoded text. No key? See all 26 shifts, best guess first.

Last updated: October 5, 2026•Author: Mateo Díaz•Reviewed by: Riley Williams
Updates as you typePrivate: stays in your browser
Mode
Try an example:
Enter the key

Shift 3 · key letter D

shift 3
Coded letter → decoded letter with this key. Letters in your message are marked.
AX
BY
CZ
DA
EB
FC
GD
HE
IF
JG
KH
LI
MJ
NK
OL
PM
QN
RO
SP
TQ
UR
VS
WT
XU
YV
ZW

Don't know the key? Try every shift

Paste a coded message. The tool tries all 26 shifts and puts the most English-like result first.

This Caesar cipher decoder with key changes a coded message back into normal text. Paste the message, type the key, and read the result immediately. The key can be a number (3), a letter (D) or a keyword for a keyed Caesar cipher. If you do not know the key, the decoder tries all 26 shifts and shows the best guess first.

How to Decode a Caesar Cipher with a Key

  1. Paste the coded message in the box.
  2. Make sure Decode is selected.
  3. Type the key in the Shift field. Use a number from 0 to 25 or one letter.
  4. If the message uses a keyword, type the keyword in the Keyword field.
  5. Read the decoded text and click Copy decoded text.

Coded message (key 3):

Wkh vhfuhw phhwlqj lv dw qrrq.

Decoded text:

The secret meeting is at noon.

Decode a Caesar Cipher by Hand

A Caesar cipher moves each letter forward in the alphabet by the key. To decode, move each letter back by the same number.

With key 3:

Coded:   D E F G H ... W X Y Z A B C
Decoded: A B C D E ... T U V W X Y Z

So W becomes T, K becomes H and H becomes E. The word Wkh decodes to The. If you go back past A, start again at Z. For example, with key 3, A becomes X.

The alphabet strip under the decoder shows this table for your key. The letters in your message are marked, so you can follow each step.

Key as a Letter or a Number

Some puzzles give the key as a letter. The letter tells you where A moves to:

Letter keyShift number
A0
B1
D3
N13 (ROT13)
Z25

Type the letter or the number in the Shift field. Both give the same result. The decoder also accepts large and negative numbers. For example, 29 is the same as 3, and -1 is the same as 25.

Some puzzles count the shift in the other direction. If key 3 gives nonsense, try key 23. This is the same as moving the letters forward by 3.

Keyed Caesar Cipher (Keyword and Shift)

A keyed Caesar cipher uses a keyword to change the cipher alphabet. Write the letters of the keyword first, each letter one time. Then write the other letters in A to Z order. The shift then moves this new alphabet.

Keyword ZEBRA, shift 0:

Plain:  ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: ZEBRACDFGHIJKLMNOPQSTUVWXY

Plain text:

Meet me at the old gate at nine.

Coded text:

Kaas ka zs sfa mjr dzsa zs lgla.

To decode it, type ZEBRA in the Keyword field and 0 in the Shift field. A normal Caesar cipher is a keyed Caesar cipher with no keyword.

Decode a Caesar Cipher Without the Key

There are only 26 possible shifts. So you can try all of them. The decoder does this for you in the Don't know the key? list.

The list uses frequency analysis. In English, some letters are more common than others. E, T, A and O are very common. Q, J and Z are rare. The decoder compares the letters of each result with normal English. The result that is most like English goes to the top as the Best guess. Click a result to use that key.

Coded message, key not known:

Wzzv fyopc esp estco dezyp qczx esp zwo zlv ecpp.

Best guess, shift 11 (key letter L):

Look under the third stone from the old oak tree.

Frequency analysis needs letters to work. For a message with fewer than 20 letters, read the top results and select the one that makes sense.

Common Mistakes When You Decode

  • Encode is selected. Encode moves letters forward, so the text gets more coded. Select Decode.
  • The shift direction is different. If key 3 gives nonsense, try 23.
  • The keyword is missing. A keyed Caesar cipher does not decode with the shift only. Type the keyword too.
  • The message is not a Caesar cipher. If no shift gives normal words, the message can use a different cipher. Base64 text, for example, has a mix of letters, numbers and = signs.
  • The letters include accents. The decoder moves only the letters A to Z. Letters such as é stay the same.

Caesar Cipher Examples

KeyCoded textDecoded text
3KhoorHello
3Dwwdfn dw gdzqAttack at dawn
13 (ROT13)Uryyb jbeyqHello world
D (3)KhoorHello

ROT13 is the Caesar cipher with key 13. ROT13 decodes itself, so encode and decode give the same result.

Explore More Free Text and Code Tools

Your messages stay in your browser. The decoder does not send them to a server. The Caesar cipher is not secure, so do not use it for private data.

Paste your coded message above and decode it with your key now.

Frequently Asked Questions
Paste the coded message in the box and type the key in the Shift field. The decoded text shows immediately. To decode by hand, move each letter back in the alphabet by the key. With key 3, D becomes A and E becomes B.
Type the letter in the Shift field. The letter shows the shift: A is 0, B is 1, C is 2 and D is 3. So the key D is the same as the key 3. The tool changes the letter into the number for you.
A keyed Caesar cipher uses a keyword and a shift. The cipher alphabet starts with the letters of the keyword, each letter one time. The other letters follow in A to Z order. Then the shift moves this alphabet. Type both the keyword and the shift to decode it.
Leave the key empty and look at the list under the decoder. The tool tries all 26 shifts. It compares each result with normal English letter frequencies and puts the best guess first. Click a result to use that key.
Make sure Decode is selected, not Encode. Then do a check of the key. Some puzzles count the shift in the other direction, so key 3 can be key 23. If the message used a keyword, type the keyword too. For very short messages, the best guess is not always correct.
No. Only the letters A to Z move. Numbers, spaces, punctuation and emoji stay the same. Uppercase letters stay uppercase and lowercase letters stay lowercase.
No. There are only 26 shifts, so a person or a computer can try all of them in seconds. Use the Caesar cipher for puzzles, games, escape rooms and lessons. Do not use it to protect private data.