Caesar Cipher

Encode or decode text with a Caesar cipher using any shift you choose.

Text
Ciphertext
Runs locally in your browser

About the Caesar Cipher

The Caesar cipher shifts each letter a fixed number of places along the alphabet, wrapping from Z back to A. Named for its use by Julius Caesar, it is the simplest substitution cipher and a staple of puzzles, escape rooms and introductory cryptography. This tool applies any shift from 1 to 25 in either direction, preserving case and leaving non-letters unchanged.

To decode when you do not know the shift, try all 25: because there are so few keys, the cipher is broken by brute force in seconds, which is exactly why it offers no real security. Longer ciphertext gives itself away faster still, since letter frequencies keep their shape and simply slide along the alphabet, so the most common letter in an English message is almost always a shifted e.

The setting to watch is the direction. Encoding with shift 3 and decoding with shift 3 are opposite operations, and leaving the selector on encode for both passes gives you a shift of 6 rather than the text you started with. Spacing and punctuation are untouched, which keeps the ciphertext readable as words and makes short messages easy to guess without any key. A shift of 13 is the special case handled by the ROT13 tool, and ROT47 covers digits and symbols as well as letters.

How to use

  1. Paste the text.
  2. Set the shift and choose encode or decode.
  3. Copy the result. To crack an unknown shift, try each value.

Common questions

How do I decode without knowing the shift?
Try each shift from 1 to 25 in decode mode; the readable one is the answer. There are only 25 possibilities.
Does it preserve capital letters?
Yes. Case is kept and only letters are shifted.
What shift is ROT13?
A shift of 13, which is its own inverse. The dedicated ROT13 tool applies it in one step.