Productivity and Utilities

Caesar Cipher

Shift letters by any amount to encode or decode, or try every shift to crack a message you do not have the key for.

Everything happens in this tab. Your text is never uploaded or saved. Up to 200,000 characters.

What do you want to do?

Only the letters A to Z are shifted. Capitals stay capitals. Digits, spaces, punctuation and accented letters pass through unchanged.

Next step

How to use the caesar cipher

  1. Type or paste your message into the Text box.
  2. Choose Encode to hide a message, Decode with a known shift to read one, or Brute force if you do not know the shift.
  3. For Encode and Decode, enter a shift from 0 to 25, or press Use ROT13 to set it to 13. The result updates as you type.
  4. In Brute force mode you see all 25 possible decodings. The one with the most English-like letter pattern is marked, and each row has its own Copy button.
  5. Use Copy result, Download .txt, or Use result as input to chain steps such as encoding twice with different shifts.

Formula

encoded = (letter position + shift) mod 26

decoded = (letter position - shift) mod 26

Letters are numbered A = 0 to Z = 25. The remainder after dividing by 26 wraps the alphabet around, so Z shifted by 1 becomes A.

Shift of 3

ATTACK AT DAWN with a shift of 3 becomes DWWDFN DW GDZQ. A moves to D, T to W, C to F, K to N, D to G, W to Z and N to Q. Spaces are untouched.

To read it, choose Decode with the same shift of 3, or encode it again with a shift of 23, because 3 + 23 = 26 returns to the start.

What a Caesar cipher is

A Caesar cipher replaces every letter with the letter a fixed number of places further along the alphabet. Historical accounts, notably by the Roman writer Suetonius, say Julius Caesar used a shift of three for private messages. The shift is the whole key, so sender and receiver only need to agree on one number.

With a shift of 0 or 26 nothing changes, so the useful shifts are 1 to 25. This tool shifts only the 26 basic Latin letters. It keeps capitals as capitals and leaves digits, spaces, punctuation, accented letters and emoji exactly as they were.

ROT13 and why it undoes itself

ROT13 is the Caesar cipher with a shift of 13. Since the alphabet has 26 letters, applying it twice shifts by 26 and returns the original text. That is why the same operation both hides and reveals, which makes it popular for hiding puzzle answers or spoilers. It offers no protection from anyone who wants to read the text.

How brute force works

There are only 25 meaningful shifts, so the quickest way to break a Caesar message is to try them all. The tool decodes your text with each shift and scores each result by comparing its letter counts with typical English letter frequencies, where E, T, A, O and N are common and Q, X and Z are rare. The lowest score gets the likely tag.

This is a statistical guess. It needs enough text to work, so with fewer than 12 letters the tool shows all 25 rows without picking one. Text in other languages, or text made of random letters or codes, may not point to a clear winner, so always read the likely row to see whether it makes sense.

Security and privacy

A Caesar cipher is a puzzle and teaching tool, not real security. Anyone can break it in seconds, with or without this page. Use it for games, classroom exercises and escape rooms. Your text is processed in this tab and is never uploaded or saved.

Assumptions and limits

  • Only A to Z and a to z are shifted. Accented letters, non-Latin alphabets, digits and symbols are left unchanged.
  • The shift field accepts whole numbers from 0 to 25. A shift of 26 or more is the same as the remainder after dividing by 26.
  • The brute force guess uses typical English letter frequencies and is not reliable for very short text or other languages.
  • Input is limited to 200,000 characters to keep the page responsive.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I decode a Caesar cipher without knowing the shift?

Choose Brute force and paste the message. You will see all 25 decodings, and the one whose letters look most like English is marked. Read the marked row, and if it is not real words, scan the others for sentences that make sense.

Is ROT13 the same as a Caesar cipher?

ROT13 is one specific Caesar cipher, the one with a shift of 13. Because 13 is half of 26, running it twice returns the original text, so one button both encodes and decodes.

Does the cipher change numbers and punctuation?

No. Only letters move. Digits, spaces, commas, accented characters and emoji stay as typed, which keeps word lengths visible and is one reason the cipher is easy to break.

Why does shifting by 26 give back my original text?

The alphabet has 26 letters, so moving 26 places lands on the same letter. Every shift is therefore equivalent to a shift from 0 to 25, which is why the tool limits the field to that range.

Can I use this to protect private information?

Please do not. A Caesar cipher has only 25 possible keys and can be broken by hand in minutes. For real secrets use a proper password manager or encrypted messaging, and see the password generator for strong passwords.