99digest is in early access — tools are free while we grow.
Guide

How to Use a Caesar Cipher and ROT13

Julius Caesar is said to have used it for military messages. The Roman writer Suetonius records a shift of three places. Two thousand years later it is still the first cipher most people try, mainly because you can do it with a pencil. Just do not trust it with anything private.

How it works

Pick a shift between 1 and 25. Replace each letter with the one that many places further on, wrapping from Z back to A. With a shift of 3, A becomes D, B becomes E, and X becomes A. Capital letters stay capital, and digits, spaces and punctuation are left exactly as they were.

So “Hello, World!” with a shift of 3 becomes “Khoor, Zruog!”. To read it back, shift in the other direction.

Using the tool

  1. Open the Caesar Cipher tool and paste your text.
  2. Choose a shift (13, 1, 2, 3, 4, 5, 10, 20 or 25) and select encode or decode. The tool starts on 13 because ROT13 is by far the most common use; set it to 3 for Caesar’s own version.
  3. Copy the result.

ROT13

The shift number depends on who you ask. Suetonius gives 3 for Caesar, while ROT13 is a much later convention that became popular on early online discussion groups. A shift of 13 is called ROT13, and it has a useful property: the alphabet has 26 letters, so shifting by 13 twice gets you back to the start. The same operation both hides and reveals the text. “Hello, World!” becomes “Uryyb, Jbeyq!”, and running that through ROT13 again returns “Hello, World!”. Online forums have long used it to hide spoilers and punchlines so they are not read by accident.

Why it is not security

There are only 25 possible shifts, so anyone can try them all in a minute. Even without trying, the cipher keeps the pattern of the language: in English, “e” is the most common letter, so the most common letter in the coded text probably stands for it, and that reveals the shift. This is called frequency analysis. Treat a Caesar cipher as an encoding, like Base64, not as encryption. For real secrets, use a proper tool such as a password manager or encrypted messaging.

Good uses

  • Classroom exercises on how ciphers and codebreaking work.
  • Puzzles, escape rooms and geocaching clues.
  • Hiding a spoiler so readers must choose to decode it.
Try the Caesar Cipher / ROT13 Free, instant, and runs in your browser.