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.

caesar.decode
Plain text
Cipher text

Dwwdfn dw gdzq

3

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

HELLO (shift 3)
KHOOR
KHOOR (shift 3, decode)
HELLO
ATTACK AT DAWN (shift 5)
FYYFHP FY IFBS

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.

The Caesar cipher alphabet at a shift of 3: each plain letter and the cipher letter it becomes.
PlainABCDEFGHIJKLMNOPQRSTUVWXYZ
CipherDEFGHIJKLMNOPQRSTUVWXYZABC

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.

Every shift applied to your text. The row marked most likely has the letter frequencies closest to English, measured by chi-squared. A lower score is a better match.
ShiftDecoded textScoreCopy
1Vjg vtgcuwtg ku dwtkgf wpfgt vjg qnf qcm vtgg8.84
2Uif usfbtvsf jt cvsjfe voefs uif pme pbl usff4.99
3most likelyThe treasure is buried under the old oak tree0.58
4Sgd sqdzrtqd hr atqhdc tmcdq sgd nkc nzj sqdd23.94
5Rfc rpcyqspc gq zspgcb slbcp rfc mjb myi rpcc7.39
6Qeb qobxprob fp yrofba rkabo qeb lia lxh qobb16.74
7Pda pnawoqna eo xqneaz qjzan pda khz kwg pnaa18.07
8Ocz omzvnpmz dn wpmdzy piyzm ocz jgy jvf omzz69.95
9Nby nlyumoly cm volcyx ohxyl nby ifx iue nlyy7.17
10Max mkxtlnkx bl unkbxw ngwxk max hew htd mkxx33.87
11Lzw ljwskmjw ak tmjawv mfvwj lzw gdv gsc ljww19.25
12Kyv kivrjliv zj slizvu leuvi kyv fcu frb kivv12.49
13Jxu jhuqikhu yi rkhyut kdtuh jxu ebt eqa jhuu14.88
14Iwt igtphjgt xh qjgxts jcstg iwt das dpz igtt9.22
15Hvs hfsogifs wg pifwsr ibrsf hvs czr coy hfss2.83
16Gur gernfher vf ohevrq haqre gur byq bnx gerr8.50
17Ftq fdqmegdq ue ngduqp gzpqd ftq axp amw fdqq49.26
18Esp ecpldfcp td mfctpo fyopc esp zwo zlv ecpp7.12
19Dro dbokcebo sc lebson exnob dro yvn yku dboo2.61
20Cqn canjbdan rb kdarnm dwmna cqn xum xjt cann7.99
21Bpm bzmiaczm qa jczqml cvlmz bpm wtl wis bzmm32.07
22Aol aylhzbyl pz ibyplk bukly aol vsk vhr ayll7.30
23Znk zxkgyaxk oy haxokj atjkx znk urj ugq zxkk39.65
24Ymj ywjfxzwj nx gzwnji zsijw ymj tqi tfp ywjj44.11
25Xli xviewyvi mw fyvmih yrhiv xli sph seo xvii10.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.

Related translators