Caesar cipher decoder

Paste a Caesar cipher and decode it with the shift you know, or leave the shift to the decoder: it tries all 25 and puts the one that reads like English first. Encoding works too.

Key: cipher letter → plain letter (edit any letter; edited letters are kept when you solve again)

Don't know the shift? Every shift, best guess first

How to decode a Caesar cipher

A Caesar cipher moves every letter the same number of places along the alphabet. With a shift of 3, A becomes D, B becomes E, and X wraps round to A. To decode, you move each letter back by the same number.

  1. Paste the coded message into the box.
  2. If you know the shift, type it and press Decode with this shift. The plain and cipher alphabets are shown under the answer so you can check any letter.
  3. If you do not know it, look at the ranked list: all 25 shifts are decoded at once, and the one that reads most like English is at the top.

To make a coded message instead, type your text, choose a shift and press Encode. Spaces, punctuation and capital letters stay where they were.

How the decoder finds the shift

A Caesar cipher has only 25 possible keys, so the decoder simply tries every one. Each result is scored by how common its four-letter sequences are in English (THER and TION score high, QZXJ scores nothing), using statistics we built from about 5.1 million letters of public-domain novels. In our tests on passages from a book that was not used to build the statistics, the correct shift came first every time. Very short messages of a few letters can read as English under more than one shift, so check the top two or three when the message is tiny.

Worked example

The Example message begins Tlla tl if aol vsk vhr ayll ha uvvu. The decoder ranks a shift of 7 first: T moves back 7 places to M, l to e, a to t, giving Meet me by the old oak tree at noon. Encoding that sentence again with a shift of 7 gives back the original.

ROT13

ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, shifting by 13 twice brings every letter back to where it started, so the same step both hides and reveals a message. It is still used online to hide spoilers and puzzle answers. Press the ROT13 button to apply it.

Caesar cipher table

Each row shows what A to Z become under one shift. To decode by hand, find the cipher letter in the row for your shift and read the plain letter in the same position of the alphabet.

ShiftA to Z becomes
1B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
2C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
3D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
4E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
5F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
6G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
7H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
8I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
9J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
10K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
11L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
12M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
13 (ROT13)N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
14O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
15P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
16Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
17R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
18S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
19T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
20U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
21V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
22W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
23X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
24Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
25Z A B C D E F G H I J K L M N O P Q R S T U V W X Y

Where the name comes from

The Roman historian Suetonius wrote that Julius Caesar wrote private letters by replacing each letter with the one three places further on, so a shift of 3 is the classic Caesar cipher. With only 25 keys it offers no real protection today; it survives in puzzles, escape rooms and as the first step in learning cryptography. A cipher that uses a different shift for each letter, set by a keyword, is the Vigenère cipher, which the cipher solver also cracks. If each letter is replaced by an unrelated letter rather than shifted, it is a substitution cipher: use the cryptogram solver.

This page decodes what you type. It does not publish answers to any newspaper or app puzzle.

Solver tested . Found a problem? Tell us.

Questions

How do I decode a Caesar cipher without the shift?

Paste the message: the decoder tries all 25 shifts and lists them with the most English-looking result first. With a sentence or more, the right shift is almost always at the top.

What shift did Julius Caesar use?

A shift of 3, according to the Roman historian Suetonius: A was written as D, B as E, and so on.

What is the difference between ROT13 and a Caesar cipher?

ROT13 is a Caesar cipher with a shift of 13. It is special because applying it twice gives back the original text, so the same step encodes and decodes.

Does the decoder keep spaces and punctuation?

Yes. Only the letters A to Z are shifted; spaces, digits, punctuation and capital letters stay where they were.

My message does not decode under any shift. Why?

It may not be a Caesar cipher. If each letter maps to an unrelated letter, try the cryptogram solver; if the letters look evenly spread, it may be Vigenère, which the cipher solver handles.

Is my message sent anywhere?

No. Decoding happens in your browser and the message is only saved in your own browser.