Cipher
Caesar Cipher Decoder and Encoder
The Caesar cipher shifts every letter a fixed number of places along the alphabet. Choose a shift, type your message, and read the result live. Set the shift to decode a message someone sent you.
Dwwdfn dw gdzq
It is the friendliest cipher to learn and the classic first puzzle in cryptography. All the work happens in your browser.
How the Caesar Cipher works
Pick a shift number from 1 to 25. Each letter moves that many places forward through the alphabet, wrapping around from Z back to A. A shift of 3 turns A into D and Z into C.
To decode, apply the same shift in reverse (or set the tool to decode). Non-letters like spaces and punctuation are left untouched.
Examples
Caesar cipher chart
At a shift of 3, the shift Julius Caesar is said to have used, A becomes D, B becomes E and so on to the end of the alphabet, where it wraps back around.
| Plain | 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 | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cipher | 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 | C |
Decode without the key: all 25 shifts
Most people arriving at a Caesar cipher do not have the key, and a slider cannot help with that. There are only 25 possible keys, so the honest answer is to try all of them at once and read the one that makes sense. That is the whole reason this cipher offers no protection.
| Shift | Decoded text | Score | Copy |
|---|---|---|---|
| 1 | Vjg vtgcuwtg ku dwtkgf wpfgt vjg qnf qcm vtgg | 8.84 | |
| 2 | Uif usfbtvsf jt cvsjfe voefs uif pme pbl usff | 4.99 | |
| 3most likely | The treasure is buried under the old oak tree | 0.58 | |
| 4 | Sgd sqdzrtqd hr atqhdc tmcdq sgd nkc nzj sqdd | 23.94 | |
| 5 | Rfc rpcyqspc gq zspgcb slbcp rfc mjb myi rpcc | 7.39 | |
| 6 | Qeb qobxprob fp yrofba rkabo qeb lia lxh qobb | 16.74 | |
| 7 | Pda pnawoqna eo xqneaz qjzan pda khz kwg pnaa | 18.07 | |
| 8 | Ocz omzvnpmz dn wpmdzy piyzm ocz jgy jvf omzz | 69.95 | |
| 9 | Nby nlyumoly cm volcyx ohxyl nby ifx iue nlyy | 7.17 | |
| 10 | Max mkxtlnkx bl unkbxw ngwxk max hew htd mkxx | 33.87 | |
| 11 | Lzw ljwskmjw ak tmjawv mfvwj lzw gdv gsc ljww | 19.25 | |
| 12 | Kyv kivrjliv zj slizvu leuvi kyv fcu frb kivv | 12.49 | |
| 13 | Jxu jhuqikhu yi rkhyut kdtuh jxu ebt eqa jhuu | 14.88 | |
| 14 | Iwt igtphjgt xh qjgxts jcstg iwt das dpz igtt | 9.22 | |
| 15 | Hvs hfsogifs wg pifwsr ibrsf hvs czr coy hfss | 2.83 | |
| 16 | Gur gernfher vf ohevrq haqre gur byq bnx gerr | 8.50 | |
| 17 | Ftq fdqmegdq ue ngduqp gzpqd ftq axp amw fdqq | 49.26 | |
| 18 | Esp ecpldfcp td mfctpo fyopc esp zwo zlv ecpp | 7.12 | |
| 19 | Dro dbokcebo sc lebson exnob dro yvn yku dboo | 2.61 | |
| 20 | Cqn canjbdan rb kdarnm dwmna cqn xum xjt cann | 7.99 | |
| 21 | Bpm bzmiaczm qa jczqml cvlmz bpm wtl wis bzmm | 32.07 | |
| 22 | Aol aylhzbyl pz ibyplk bukly aol vsk vhr ayll | 7.30 | |
| 23 | Znk zxkgyaxk oy haxokj atjkx znk urj ugq zxkk | 39.65 | |
| 24 | Ymj ywjfxzwj nx gzwnji zsijw ymj tqi tfp ywjj | 44.11 | |
| 25 | Xli xviewyvi mw fyvmih yrhiv xli sph seo xvii | 10.25 |
The score in the last column is a chi-squared comparison between the decoded letter frequencies and those of ordinary English. A lower score means a closer match, and the lowest-scoring row is almost always the answer. It is shown rather than hidden so you can check the reasoning instead of trusting it.
History and origins
Named after Julius Caesar, who according to the historian Suetonius shifted letters by three to protect his military correspondence. It is one of the oldest recorded ciphers.
By modern standards it offers no real security, since there are only 25 possible shifts to try. That very weakness makes it perfect for teaching how substitution ciphers work and how they are broken.
Frequently asked questions
What shift should I use to decode a Caesar cipher?
If you do not know the shift, try each value from 1 to 25 and watch for readable text. With only 25 options this brute-force check takes seconds.
Is ROT13 a Caesar cipher?
Yes. ROT13 is simply a Caesar cipher with a shift of 13. Because 13 is half of 26, applying it twice returns the original text.
Why is the Caesar cipher considered insecure?
There are only 25 possible keys, so anyone can try them all in moments. It is a teaching cipher, not a way to protect real secrets.
Learn more
Go deeper on the ideas behind this tool.
Not sure this is the right tool?
If you have a message and you are not certain what it is, the cipher identifier reads the character set and the letter statistics and tells you which scheme it most likely uses, and why. It covers every code and cipher on this site.