Caesar cipher

The Caesar cipher moves every letter a fixed number of places along the alphabet. Pick a shift to encode or decode, choose 13 for ROT13, or switch to all shifts to read an unknown message by brute force.

Mode

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Type or paste your text and choose Encode or Decode.
  2. Pick the shift from the list. Use 13 for ROT13.
  3. If you do not know the shift, choose Try all shifts and find the line that makes sense. Press Copy to take the result.

How it works

Letters are numbered 0 to 25. Encoding adds the shift and takes the remainder after dividing by 26, so the end of the alphabet wraps round to the start. Decoding subtracts the shift instead. Try all shifts shows decoding with each key from 1 to 25, in order.

Worked example

With a shift of 3, “Hello, World!” becomes “Khoor, Zruog!”: H to K, e to h, l to o, o to r, and the punctuation stays. Decoding “Khoor, Zruog!” with the same shift returns the original. ROT13 turns “Hello” into “Uryyb”.

Tips

A Caesar cipher has only 25 useful keys, so anyone can try them all in a moment. Use it for puzzles, games and teaching, never for secrets. For the key to a longer message, look for common short words such as “the” in the all-shifts list.

Frequently asked questions

What is a Caesar cipher?

It is one of the oldest and simplest ciphers. Each letter is replaced by the letter a fixed number of places later in the alphabet, so with a shift of 3 the letter A becomes D and the letter X wraps round to A.

How do I use ROT13?

Choose shift 13. The alphabet has 26 letters, so shifting by 13 twice returns the original, and the same step both encodes and decodes. Encode and Decode give identical results for 13.

How can I decode a message when I do not know the shift?

Choose Try all shifts. The tool lists what the message becomes under each of the 25 possible shifts, numbered by key, and you look for the line that reads as normal language. The shift setting is not used in that mode.

Which characters are changed?

Only the 26 Latin letters A to Z and a to z, and their case is kept. Digits, spaces, punctuation, accented letters and other alphabets are left unchanged. Because of that, the cipher is easy to break and must not protect anything important.

More in Text

All tools in this category: Text ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.