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.

Quick shifts

Shift 3: each letter in the top row was made from the one below it (read bottom to top to decode).

PlainABCDEFGHIJKLMNOPQRSTUVWXYZCipherDEFGHIJKLMNOPQRSTUVWXYZABC

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.

RankShiftDecoded textChi-squaredAction
13Best guessThe treasure is buried beneath the old oak tree.19.7
219Dro dbokcebo sc lebson loxokdr dro yvn yku dboo.101.0
315Hvs hfsogifs wg pifwsr psbsohv hvs czr coy hfss.108.7
42Uif usfbtvsf jt cvsjfe cfofbui uif pme pbl usff.193.2
516Gur gernfher vf ohevrq orarngu gur byq bnx gerr.194.2
69Nby nlyumoly cm volcyx vyhyunb nby ifx iue nlyy.201.2
722Aol aylhzbyl pz ibyplk ilulhao aol vsk vhr ayll.225.9
818Esp ecpldfcp td mfctpo mpyples esp zwo zlv ecpp.255.2
914Iwt igtphjgt xh qjgxts qtctpiw iwt das dpz igtt.320.2
105Rfc rpcyqspc gq zspgcb zclcyrf rfc mjb myi rpcc.371.9
117Pda pnawoqna eo xqneaz xajawpd pda khz kwg pnaa.389.8
121Vjg vtgcuwtg ku dwtkgf dgpgcvj vjg qnf qcm vtgg.432.4
1325Xli xviewyvi mw fyvmih firiexl xli sph seo xvii.491.5
1412Kyv kivrjliv zj slizvu svevrky kyv fcu frb kivv.498.8
1520Cqn canjbdan rb kdarnm knwnjcq cqn xum xjt cann.512.8
1611Lzw ljwskmjw ak tmjawv twfwslz lzw gdv gsc ljww.686.8
174Sgd sqdzrtqd hr atqhdc admdzsg sgd nkc nzj sqdd.807.3
1821Bpm bzmiaczm qa jczqml jmvmibp bpm wtl wis bzmm.850.1
1913ROT13Jxu jhuqikhu yi rkhyut ruduqjx jxu ebt eqa jhuu.885.0
206Qeb qobxprob fp yrofba ybkbxqe qeb lia lxh qobb.960.8
2110Max mkxtlnkx bl unkbxw uxgxtma max hew htd mkxx.1453.5
2223Znk zxkgyaxk oy haxokj hktkgzn znk urj ugq zxkk.1492.6
2324Ymj ywjfxzwj nx gzwnji gjsjfym ymj tqi tfp ywjj.1633.2
2417Ftq fdqmegdq ue ngduqp nqzqmft ftq axp amw fdqq.2268.3
258Ocz 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

  1. Choose Encode or Decode.
  2. Type or paste your text.
  3. Set the shift from 1 to 25. If you don't know it, use the list of all 25 shifts below the result.
  4. 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.