Home › Caesar Cipher Solver

Caesar Cipher Solver

Paste a coded message and the solver tries all 25 shifts, putting the one that looks most like English on top. You can also encode or decode with a shift you choose and watch the cipher wheel turn.

Encoded text

Plain  
Cipher 

Caesar cipher solver: all 25 shifts

No key? The Caesar cipher has only 25 possible shifts, so the solver simply tries them all. It scores each one by how likely its letters are in normal English, adds points for common English words, and highlights the best. A few words full of rare letters (Z, Q, J, X) can fool the score, so read the top rows yourself.

ShiftDecoded text

Caesar cipher wheel

The outer ring is the normal alphabet and the inner ring is the cipher alphabet. Move the shift slider above and the inner ring turns: with shift 3, A on the outside sits over D on the inside. A paper Caesar cipher wheel works the same way.

How the Caesar cipher works

Every letter is moved the same number of places along the alphabet. With a shift of 3, A becomes D, B becomes E, and X wraps around to A. To decode, you move the same number of places back. Spaces, numbers and punctuation stay as they are, and capital letters stay capital.

The Roman historian Suetonius wrote that Julius Caesar used a shift of three in his private letters, and that Augustus used a shift of one. ROT13, a shift of 13, is still used online to hide spoilers; because 13 is half of 26, the same shift both encodes and decodes.

Use it as a Caesar cipher translator or decoder

When you already know the shift, this works as a normal Caesar cipher decoder: choose Decode, set the shift, and the plain text appears as you type.

  1. Type or paste your text.
  2. Pick Encode or Decode and set the shift. Both people need to know the shift.
  3. Copy the result, or press "Use result as input" to check that it decodes back.

A well-known puzzle line, zsmxsm sc sx zyvilsec zvkjk, is a shift of 10: paste it above and the solver finds it.

Why the Caesar cipher is not safe

With only 25 keys, anyone can try them all in seconds, as this page does. Use it for puzzles, geocaches and classroom-style fun, never for passwords or private data.

How we tested

"Hello, World!" with shift 3 gave "Khoor, Zruog!"; ROT13 gave "Uryyb, Jbeyq!" and decoding that gave the original back. We gave the solver six coded messages. It ranked the right answer first for "The quick brown fox…" (shift 3), the puzzle line above (shift 10), "Attack at dawn" (shift 7), the single word "Hello" (shift 5) and a 16-word sentence (shift 19). It missed "Zebra quiz jukebox" (shift 11): three words full of rare letters fool the score, which is why the full table of 25 shifts is always shown. Our first version scored with a chi-squared test and missed the puzzle line, so we replaced it before publishing. At shift 3 the wheel showed D under A. We ran the page in Chromium at desktop width and at 375 px: no sideways scrolling and no console errors. Not tested yet: Safari on iPhone and Firefox.

Questions

How do I decode a Caesar cipher without the key?

Paste it into the solver. It tries all 25 shifts and ranks them by how much they look like English. Check the top rows; with very short messages the right answer may be second or third.

What shift did Julius Caesar use?

A shift of three, according to the Roman writer Suetonius: A was written as D, B as E, and so on.

Is ROT13 a Caesar cipher?

Yes. ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying it twice gives back the original text.

Does the solver work for other languages?

Encoding and decoding work for any text written with the letters A to Z. The automatic ranking uses English letter frequencies, so for other languages read through all 25 rows instead of trusting the top one.

What happens to numbers and accented letters?

They are left unchanged. Only the 26 letters A to Z, in capitals or small letters, are shifted.