Caesar Cipher Encoder and Decoder
About this tool
About Caesar Cipher
The Caesar cipher shifts every letter a fixed number of places along the alphabet. Julius Caesar is said to have used a shift of 3, turning A into D and HELLO into KHOOR, and it is still the first cipher taught in classrooms, escape rooms and puzzle hunts. Set the Shift from 1 to 25 and choose Encode to shift forward or Decode to shift back; capitals stay capitals, and punctuation, spaces and accented letters are kept as they are. Tick Shift digits too to rotate 0–9 by the same amount. If you have a message but not the key, tick Try all 25 shifts: every possible decoding is listed and the one whose letter frequencies are closest to English is highlighted, which usually finds the answer in one look for any sentence of reasonable length. Shift 13 is ROT13, and the same page also handles ROT18 and ROT47. Nothing you type is sent anywhere.
Built and maintained by Abhi JainUpdated
How to Use the Caesar Cipher
- 1
Enter the message
Type or paste the text into the left pane.
- 2
Set Shift and Direction
Choose the Shift (3 is the classic) and pick Encode or Decode.
- 3
Crack an unknown shift
Tick Try all 25 shifts to see every decoding, with the most English-looking one highlighted, then copy the answer.
Caesar Cipher: questions and answers
How does the Caesar cipher work?
Each letter is replaced by the letter a fixed number of positions later in the alphabet, wrapping from Z back to A. With a shift of 3, A becomes D, X becomes A, and HELLO becomes KHOOR. Decoding shifts back by the same amount.
How do I decode a Caesar cipher without the key?
There are only 25 possible shifts, so try them all. Tick Try all 25 shifts and the tool lists every decoding, highlighting the one whose letter frequencies best match English.
What is the formula for the Caesar cipher?
With letters numbered A = 0 to Z = 25, encryption is E(x) = (x + n) mod 26 and decryption is D(x) = (x − n) mod 26, where n is the shift.
Is ROT13 a Caesar cipher?
Yes, it is the Caesar cipher with shift 13. Because 13 is half of 26, encoding twice returns the original, so ROT13 needs no separate decode step.
Is the Caesar cipher secure?
No. With only 25 keys it can be broken by hand in minutes. It is useful for puzzles and teaching, not for protecting anything.
More ROT13 Encoder presets
Related tools
- Base32 EncoderEncode and decode Base32 (RFC 4648), Base32hex and Crockford Base32, for text or raw bytes.
- Morse Code TranslatorTranslate text to Morse code and back, play it as sound with adjustable speed, and download a WAV.
- Base64 EncoderEncode and decode Base64 for text and files, with URL-safe, MIME and data URL options.
- Encrypt TextTurn a message into password-protected AES-256 ciphertext you can paste anywhere.