Caesar Cipher Encoder & Decoder
Encode or decode a Caesar cipher with any shift from 1 to 25, or crack one: all 25 shifts listed and ranked by how English each looks, best guess first.
A Caesar cipher replaces each letter with the letter a fixed number of places further along the alphabet, wrapping from Z back to A. With a shift of 3, HELLO becomes KHOOR, and decoding shifts back by 3. ROT13 is the same cipher with a shift of 13, so encoding and decoding are the same step. If you don't know the shift, paste the ciphertext into the decoder: it tries all 25 shifts and ranks them by how closely each result matches English, using common letter pairs and words and a chi-squared test against English letter frequencies. You can keep the original case, spaces and punctuation, or output letters only, optionally in blocks of five, the traditional way to hide word lengths.
Shift 3: each letter in the top row was made from the one below it (read bottom to top to decode).
Don't know the shift? All 25 decodings
Every possible shift of the text you entered, most English-like first: results containing common English letter pairs and words come first, then all are ordered by a chi-squared test against English letter frequencies (lower is closer to English). Short messages can fool the ranking, so scan the list.
| Rank | Shift | Decoded text | Chi-squared | Action |
|---|---|---|---|---|
| 1 | 3Best guess | The treasure is buried beneath the old oak tree. | 19.7 | |
| 2 | 19 | Dro dbokcebo sc lebson loxokdr dro yvn yku dboo. | 101.0 | |
| 3 | 15 | Hvs hfsogifs wg pifwsr psbsohv hvs czr coy hfss. | 108.7 | |
| 4 | 2 | Uif usfbtvsf jt cvsjfe cfofbui uif pme pbl usff. | 193.2 | |
| 5 | 16 | Gur gernfher vf ohevrq orarngu gur byq bnx gerr. | 194.2 | |
| 6 | 9 | Nby nlyumoly cm volcyx vyhyunb nby ifx iue nlyy. | 201.2 | |
| 7 | 22 | Aol aylhzbyl pz ibyplk ilulhao aol vsk vhr ayll. | 225.9 | |
| 8 | 18 | Esp ecpldfcp td mfctpo mpyples esp zwo zlv ecpp. | 255.2 | |
| 9 | 14 | Iwt igtphjgt xh qjgxts qtctpiw iwt das dpz igtt. | 320.2 | |
| 10 | 5 | Rfc rpcyqspc gq zspgcb zclcyrf rfc mjb myi rpcc. | 371.9 | |
| 11 | 7 | Pda pnawoqna eo xqneaz xajawpd pda khz kwg pnaa. | 389.8 | |
| 12 | 1 | Vjg vtgcuwtg ku dwtkgf dgpgcvj vjg qnf qcm vtgg. | 432.4 | |
| 13 | 25 | Xli xviewyvi mw fyvmih firiexl xli sph seo xvii. | 491.5 | |
| 14 | 12 | Kyv kivrjliv zj slizvu svevrky kyv fcu frb kivv. | 498.8 | |
| 15 | 20 | Cqn canjbdan rb kdarnm knwnjcq cqn xum xjt cann. | 512.8 | |
| 16 | 11 | Lzw ljwskmjw ak tmjawv twfwslz lzw gdv gsc ljww. | 686.8 | |
| 17 | 4 | Sgd sqdzrtqd hr atqhdc admdzsg sgd nkc nzj sqdd. | 807.3 | |
| 18 | 21 | Bpm bzmiaczm qa jczqml jmvmibp bpm wtl wis bzmm. | 850.1 | |
| 19 | 13ROT13 | Jxu jhuqikhu yi rkhyut ruduqjx jxu ebt eqa jhuu. | 885.0 | |
| 20 | 6 | Qeb qobxprob fp yrofba ybkbxqe qeb lia lxh qobb. | 960.8 | |
| 21 | 10 | Max mkxtlnkx bl unkbxw uxgxtma max hew htd mkxx. | 1453.5 | |
| 22 | 23 | Znk zxkgyaxk oy haxokj hktkgzn znk urj ugq zxkk. | 1492.6 | |
| 23 | 24 | Ymj ywjfxzwj nx gzwnji gjsjfym ymj tqi tfp ywjj. | 1633.2 | |
| 24 | 17 | Ftq fdqmegdq ue ngduqp nqzqmft ftq axp amw fdqq. | 2268.3 | |
| 25 | 8 | Ocz omzvnpmz dn wpmdzy wzizvoc ocz jgy jvf omzz. | 2913.8 |
Common use cases
- Decode a Caesar or ROT13 clue in an escape room, geocache or puzzle hunt
- Crack a message with an unknown shift by checking all 25 decodings at once
- Write shifted messages for a classroom code-breaking lesson
- Check a cipher-wheel puzzle's answer before printing it
How to use
- Choose Encode or Decode.
- Type or paste your text.
- Set the shift from 1 to 25. If you don't know it, use the list of all 25 shifts below the result.
- Choose whether to keep case and punctuation, then copy the result.
FAQ
Is the Caesar cipher secure?
No. There are only 25 possible shifts, so anyone can try them all in seconds, as this tool does. Use it for puzzles, games and teaching, not to protect real information.
What is ROT13?
ROT13 is a Caesar cipher with a shift of 13. Because 13 is half of 26, applying ROT13 twice returns the original text, so the same step both encodes and decodes.
How does the decoder pick the best shift?
It decodes the text with all 25 shifts. Results that contain common English letter pairs or words rank first, and results are then ordered by a chi-squared test: how far each one's letter counts are from typical English frequencies. Very short messages can still fool it, so scan the whole list.
Does the Caesar cipher change numbers or punctuation?
No. Only the letters A to Z are shifted. Digits, spaces and punctuation stay as they are unless you choose letters-only output.
Related tools
- Vigenère Cipher Encoder & DecoderEncode or decode a Vigenère cipher with a keyword, see the key lined up under each letter, and estimate an…
- Atbash Cipher Encoder & DecoderEncode or decode Atbash, the cipher that reverses the alphabet (A↔Z, B↔Y). One box works both ways, keeps…
- Cipher IdentifierPaste a mystery code to see its letter frequencies and index of coincidence, a ranked list of likely ciphers…
- Rail Fence CipherEncode or decode a rail fence (zigzag) cipher with 2 to 20 rails and an optional offset, see the zigzag grid…
- Letter to Number Cipher (A1Z26)Convert letters to numbers (A=1 to Z=26) and numbers back to letters. Choose dashes, spaces or commas as…
- Pigpen Cipher TranslatorTurn text into pigpen cipher symbols, download them as SVG or PNG for printing, and decode pigpen by clicking…