Caesar Cipher Decoder

: Encode and decode the Caesar shift cipher and ROT13 with any shift, or crack a message whose shift is unknown: all 26 shifts ranked by how English they read, the best one in full
Limits: .txt
Cipher text
3 is Caesar's own; 13 is ROT13.
0 to 9 move by the same shift, mod 10.
Options
The result appears here as you type.

Encode a message with the Caesar cipher, decode one when you know the shift, or crack it when you do not: the page tries all 26 shifts and ranks them by how much each reads like English, with the best guess in full. ROT13 is shift 13. It works as a Caesar cipher translator for puzzles, escape rooms, geocaches and homework, and it runs in your browser.

  1. Type or paste into Text, or load a .txt file. The Examples give a message, a cipher text with shift 3 and a ROT13 line.
  2. Pick the Direction: Encode shifts each letter forward, Decode shifts it back, and Crack (unknown shift) tries every shift for you.
  3. Set the Shift, 1 to 25. 3 is the shift Julius Caesar used; the ROT13 button sets 13, where encoding and decoding are the same thing.
  4. Read the result, with the plain and shifted alphabets under it. Swap turns the result into the input and flips Encode and Decode, so you can check a message reads back.
  5. Under Options, Shift digits too moves 0 to 9 as well, Letter case keeps or changes the case, and Spaces and punctuation keeps them, removes them, or writes the letters in classic groups of five.

Shift 3 moves each letter three places on, so H becomes K and W wraps round to Z. Decoding shifts them back: Hello, World!

Input
Hello, World!
Output
Khoor, Zruog!

How do I decode a Caesar cipher without the key?

Choose Crack (unknown shift) and paste the text. Every shift is tried and ranked by common English words and letter frequencies; the best one is shown in full, and the shift it used is in the title.

What is the shift in a Caesar cipher?

How many places each letter moves. Caesar used 3: A to D, B to E, Z to C. Any shift from 1 to 25 works; 26 brings every letter back to itself. Encoding Hello, World! with 3 gives Khoor, Zruog!.

Is ROT13 a Caesar cipher?

Yes, ROT13 is the Caesar cipher with a shift of 13. Because 13 is half the alphabet, running it twice gives the original text back. Press ROT13 to set it.

Is the Caesar cipher secure?

No. With only 25 possible shifts anyone can try them all in seconds, as this page does. Use it for puzzles and teaching; to protect real data use a modern cipher such as AES.

Does it shift numbers?

Not by default: the classical cipher only moves letters. Turn on Shift digits too to move 0 to 9 by the same shift, wrapping from 9 to 0.

Runs entirely in your browser. Nothing is uploaded.