Skip to the content

Caesar Cipher & ROT13

Shift every letter a fixed number of places along the alphabet to encode or decode a message. With a shift of 13 this is ROT13.

Only need one direction? Caesar Cipher Encoder and Caesar Cipher Decoder have their own pages.

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

The Caesar cipher

Pick a number and move every letter that many places along the alphabet. With a shift of 3, A becomes D and B becomes E, and when you run off the end you wrap around, so X becomes A. That is the whole cipher. Julius Caesar is said to have used a shift of 3 for his military letters, which is where the name comes from.

Digits, spaces and punctuation are left alone, and upper and lower case are kept.

ROT13

A shift of 13 is special because the alphabet has 26 letters. Shifting twice by 13 brings you back to where you started, so the same operation both hides and reveals the text. ROT13 has been used online since the early 1980s to keep spoilers, punchlines and puzzle answers away from people who would rather not read them by accident.

Not for secrets

There are only 25 possible shifts, so anyone can try them all in under a minute. If you have a message and don't know the shift, decode it with 1, 2, 3 and so on until words appear. Use it for puzzles and geocaches, never for something you actually need to keep private.

See all 15