Encode and decode a Caesar cipher or ROT13

Shift letters to encode or decode a Caesar cipher or ROT13, keeping case and punctuation, or try all 25 shifts to break a message. Runs in your browser.

How to use the Caesar cipher

  1. 1

    Paste the message

  2. 2

    Choose to encode, decode or try every shift

  3. 3

    Copy or download the result

The oldest shift cipher, both ways, in your browser

A Caesar cipher replaces each letter with the one a fixed number of places further along the alphabet, wrapping from Z back to A. With a shift of 3, A becomes D, B becomes E and Z becomes C. Suetonius describes Julius Caesar writing private letters this way, swapping each letter for the fourth one along, D for A, which is how the cipher got its name.

Encode and decode

Choose “Shift forward, to encode”, set the shift and press the button. To read a message, choose “Shift back, to decode” with the same shift. A shift of -3 is the same as 23, and 26 leaves every letter where it was. Upper case stays upper case and lower case stays lower case, so “Hello, World!” with ROT13 is “Uryyb, Jbeyq!”.

ROT13

ROT13 is a shift of 13, half the alphabet, so applying it twice gives back the original. That makes it handy for hiding spoilers and puzzle answers: the reader runs the same step to reveal them. The shift starts at 13 here for that reason.

Breaking an unknown shift

With only 25 possible shifts, a Caesar cipher is broken by trying them all. Choose “Try every shift” and the message is shown under each one, labelled with its shift. Read down the list for the line that makes sense. A message of several lines gets a block per shift. This mode works on up to 5,000 characters, since it writes the text out 25 times.

What does not move

Only the 26 letters A to Z are shifted. Figures, spaces, punctuation, accented letters and other scripts stay exactly where they were, because there is no agreed way to shift them, and a guess would give text other Caesar tools could not read back.

For other ways to write text in code, see Morse code and the NATO phonetic alphabet.

Nothing is uploaded. The message is shifted in this tab.

Everything you need

Any shift, both ways

Encode or decode with any shift, 13 for ROT13 or 3 for the classic Caesar, keeping upper and lower case.

Break an unknown shift

See the message under all 25 shifts at once and read off the one that makes sense.

Private by design

The text is shifted in your browser and never sent anywhere.

Nothing uploaded: open the Network panel while it runs and check.

No daily limits or watermarks: free batches take up to 20 images.

Works offline: once the page has loaded, on any current browser.

Frequently asked questions

What is ROT13?

A Caesar shift of 13. The alphabet has 26 letters, so shifting by 13 twice brings every letter back, and the same step both encodes and decodes. It is used to hide spoilers and puzzle answers, not secrets.

How do I read a message when I do not know the shift?

Choose "Try every shift". The message is shown under all 25 shifts, and the one that reads as words is the answer, along with its shift.

What happens to numbers, punctuation and accented letters?

They stay as they are. Only the 26 letters A to Z move, upper case staying upper case. Letters such as é or ß and other scripts are not part of the shift.

Is a Caesar cipher secure?

No. There are only 25 possible shifts, so anyone can try them all in seconds, as this page does. Use it for puzzles, teaching and hiding spoilers, and use real encryption for anything private.

Sources

Related guides

Work with files privately and confidentlyPractical, sourced explanations for safer file conversion, sharing, and cleanup.