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
- Paste the coded message in the box.
- Make sure Decode is selected.
- Type the key in the Shift field. Use a number from 0 to 25 or one letter.
- If the message uses a keyword, type the keyword in the Keyword field.
- 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 key | Shift number |
|---|---|
| A | 0 |
| B | 1 |
| D | 3 |
| N | 13 (ROT13) |
| Z | 25 |
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
3gives nonsense, try23. - 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
| Key | Coded text | Decoded text |
|---|---|---|
| 3 | Khoor | Hello |
| 3 | Dwwdfn dw gdzq | Attack at dawn |
| 13 (ROT13) | Uryyb jbeyq | Hello world |
| D (3) | Khoor | Hello |
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
- Base64 encoder and decoder: decode text that looks like
SGVsbG8=. - Random letter generator: make random letters for a new cipher puzzle.
- Text upside down generator: flip a hint upside down for a puzzle.
- Mirror text generator: write a hint as mirror text for a visual puzzle.
- Reverse text online: write a message backwards, another simple puzzle code.
- Convert small letter to capital letter: write the decoded answer in capitals.
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.