Caesar Cipher Encoder & Decoder
Shift every letter by a fixed amount to encode, shift back to decode — or let CodeCipher crack an unknown shift for you.
ABCDEFGHIJKLMNOPQRSTUVWXYZDEFGHIJKLMNOPQRSTUVWXYZABC
Turn the cipher wheel
The outer ring is the plain alphabet; the inner ring is the cipher alphabet. Drag the inner ring (or focus it and use the arrow keys) to set the shift. Read a plain letter on the outside and its cipher letter directly inside it.
With shift 3, A → D, H → K, Z → C. Every position is moved the same distance, which is exactly why the cipher is weak: learn one letter pair and you know the whole key.
All 25 shifts, most English-like first
| Shift | Decoded text |
|---|---|
| 6 | Nby kocwe vliqh zir dogjm ipyl nby futs xia |
| 12 | Hvs eiwqy pfckb tcl xiadg cjsf hvs zonm rcu |
| 16 | Dro aesmu lbygx pyh tewzc yfob dro vkji nyq |
| 2 | Rfc osgai zpmul dmv hsknq mtcp rfc jyxw bme |
| 13 | Gur dhvpx oebja sbk whzcf bire gur ynml qbt |
| 25 | Uif rvjdl cspxo gpy kvnqt pwfs uif mbaz eph |
| 9 | Kyv hlztb sifne wfo aldgj fmvi kyv crqp ufx |
| 19 | Aol xbpjr iyvdu mve qbtwz vcly aol shgf kvn |
| 11 | Iwt fjxrz qgdlc udm yjbeh dktg iwt apon sdv |
| 22 | Xli uymgo fvsar jsb nyqtw sziv xli pedc hsk |
| 23 | Wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj |
| 1 | Sgd pthbj aqnvm enw itlor nudq sgd kzyx cnf |
| 3 | Qeb nrfzh yoltk clu grjmp lsbo qeb ixwv ald |
| 10 | Jxu gkysa rhemd ven zkcfi eluh jxu bqpo tew |
| 4 | Pda mqeyg xnksj bkt fqilo kran pda hwvu zkc |
| 18 | Bpm ycqks jzwev nwf rcuxa wdmz bpm tihg lwo |
| 7 | Max jnbvd ukhpg yhq cnfil hoxk max etsr whz |
| 8 | Lzw imauc tjgof xgp bmehk gnwj lzw dsrq vgy |
| 20 | Znk waoiq hxuct lud pasvy ubkx znk rgfe jum |
| 14 | Ftq cguow ndaiz raj vgybe ahqd ftq xmlk pas |
| 21 | Ymj vznhp gwtbs ktc ozrux tajw ymj qfed itl |
| 17 | Cqn zdrlt kaxfw oxg sdvyb xena cqn ujih mxp |
| 24 | Vjg swkem dtqyp hqz lworu qxgt vjg ncba fqi |
| 5 | Ocz lpdxf wmjri ajs ephkn jqzm ocz gvut yjb |
| 15 | Esp bftnv mczhy qzi ufxad zgpc esp wlkj ozr |
Breaking it with letter frequency
In ordinary English, E is the most common letter (about 12.7%), followed by T, A and O. A Caesar shift moves those peaks but keeps their pattern. Count the letters in the cipher text, find the tallest peak, and the distance from it to E is probably the key. This is the same frequency analysis the 9th-century scholar al-Kindi described, the earliest known written account of codebreaking.
A Vigenère cipher defeats simple frequency analysis by using several Caesar shifts in rotation. ROT13 and Atbash are two other fixed substitutions worth knowing.
Questions people ask
How does the Caesar cipher work?
Every letter is replaced by the letter a fixed number of places further along the alphabet, wrapping from Z back to A. With a shift of 3, A becomes D, B becomes E and Z becomes C. Decoding shifts the same number of places back.
How do I decode a Caesar cipher without the key?
There are only 25 possible shifts, so try them all. The brute-force list on this page shows every shift and ranks them by how closely their letter frequencies match English, so the real message is usually at the top.
Did Julius Caesar really use it?
Yes. The Roman historian Suetonius wrote, in The Lives of the Caesars, that Julius Caesar wrote confidential letters by replacing each letter with the one three places later, and that Augustus used a shift of one.
Is the Caesar cipher secure?
Not at all. With only 25 keys it can be broken by hand in minutes and by computer instantly. It is useful for puzzles, geocaching and teaching the ideas behind cryptography, never for protecting real information.
What is the difference between Caesar and ROT13?
ROT13 is simply a Caesar cipher with a shift of 13. Because 13 is half of 26, applying it twice gets you back to the original, so the same operation both encodes and decodes.