Skip to content

Caesar cipher encoder and decoder

Encrypt or decrypt text with the Caesar shift cipher, use ROT13, or try every shift at once to crack a message when you don't know the key.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Choose Encode or Decode.
  2. Set the shift (1–25); 13 gives ROT13.
  3. Type or paste your message.
  4. To crack an unknown shift, turn on “Try every shift”.
Try it now

How the Caesar cipher works

The Caesar cipher is one of the oldest known ciphers. It replaces each letter with the letter a fixed number of positions further along the alphabet, wrapping around from Z to A. The number is the shift, or key.

With a shift of 3:

PlainABC…XYZ
CipherDEF…ABC

So HELLO becomes KHOOR, and Meet me tomorrow becomes Phhw ph wrpruurz. To decode, shift back by the same amount.

The tool keeps upper- and lowercase as they were and leaves everything that isn't a letter A–Z unchanged: digits, spaces, punctuation and emoji pass straight through. Accented letters such as é are also left as they are.

ROT13

ROT13 is the Caesar cipher with a shift of 13. Because the English alphabet has 26 letters, shifting by 13 twice brings you back to the start, so the same operation encodes and decodes. ROT13 has long been used online to hide spoilers, puzzle answers and punchlines, not to keep anything secret.

Set the shift to 13 and the tool reminds you that you're using ROT13. Example: Why did the chicken cross the road? → Jul qvq gur puvpxra pebff gur ebnq?

Worked example

Encode ATTACK AT DAWN with a shift of 5:

  1. A → F, T → Y, T → Y, A → F, C → H, K → P
  2. A → F, T → Y
  3. D → I, A → F, W → B (wrapping around from Z), N → S

Result: FYYFHP FY IFBS.

To decode, set the same shift of 5 and choose Decode, or choose Encode with a shift of 21 (26 − 5), which does exactly the same thing. That symmetry is why any Caesar shift can be undone by shifting forward by 26 minus the key.

Cracking an unknown shift

Since there are only 25 possible shifts, a Caesar cipher is easy to break by trying them all (a brute-force attack). Turn on Try every shift and the tool shows a table with your message decoded with each shift from 1 to 25 (using the first 200 characters). Scan the list for the line that reads as normal English.

Another classic approach is frequency analysis: in English, E is the most common letter, followed by letters like T, A and O. If the most frequent letter in a long ciphertext is H, the shift is probably 3. The word frequency counter can help you look at patterns in longer texts.

Is the Caesar cipher secure?

No. With only 25 keys it offers no real protection and should be used only for puzzles, games, teaching and fun. For anything private, use modern encryption: the encrypt text tool protects a message with a password using AES-256.

Good uses for the Caesar cipher:

  • Teaching the basic ideas of keys, encryption and code breaking.
  • Escape rooms, geocaching and scavenger hunts, where a decodable clue is the point.
  • Hiding spoilers with ROT13 in forums and group chats.

Encoding and decoding happen in your browser; your messages are not uploaded. For other classic codes, try the Morse code translator or the binary translator.

Frequently asked questions

How do I decode a Caesar cipher?

Choose Decode, enter the shift that was used and paste the message. If you don't know the shift, turn on “Try every shift” and look for the readable line.

What is ROT13?

A Caesar cipher with a shift of 13. Applying it twice returns the original text, so the same step encodes and decodes.

What shift did Julius Caesar use?

According to the Roman historian Suetonius, Caesar used a shift of three: A was written as D, B as E, and so on.

Are numbers and punctuation encoded?

No. Only the letters A–Z are shifted; digits, spaces, punctuation and accented letters stay the same.

Is the Caesar cipher safe for passwords or secrets?

No. It can be broken in seconds by trying all 25 shifts. Use real encryption such as AES for anything sensitive.

Last updated: November 12, 2026

Recommended

Similar tools

If Caesar cipher and ROT13 helped, you may need these too.

See all in category →

People also use