Boneyard Tools

Caesar Cipher Encoder and Decoder

Encode or decode a message with the Caesar cipher, the classic shift cipher. Type your text, choose a shift from 0 to 25, and pick encode or decode. Letters rotate through the alphabet while case is kept and spaces, digits and punctuation pass straight through. Do not know the shift? Open the brute-force table to see all 25 possibilities at once.

How to use the Caesar cipher

  1. Type or paste your text into the box.
  2. Set the shift amount with the slider, then choose Encode or Decode.
  3. Read the result live and copy it, or open all shifts to brute force an unknown key.

Examples

Encode with a shift of 3

Text: Hello, World!, shift: 3, mode: Encode
Khoor, Zruog!

Decode it back

Text: Khoor, Zruog!, shift: 3, mode: Decode
Hello, World!

Wrap around the end of the alphabet

Text: XYZ, shift: 3, mode: Encode
ABC

Frequently asked questions

How does the Caesar cipher work?

Every letter is shifted forward through the alphabet by a fixed number of places, and the alphabet wraps around so that shifting Z by one gives A. With a shift of 3, A becomes D, B becomes E, and so on. To decode, you shift by the same amount in the opposite direction, which is the same as shifting forward by 26 minus the key.

What happens to spaces, numbers and punctuation?

Only the letters A to Z and a to z are shifted, and their case is preserved. Spaces, digits, punctuation, line breaks and accented or non-English characters pass through unchanged, so the shape of your message stays the same.

What is the difference between the Caesar cipher and ROT13?

ROT13 is just the Caesar cipher with a shift of 13. Because 13 is exactly half of 26, applying ROT13 twice returns the original text, so the same operation both encodes and decodes. Set the shift to 13 here to use ROT13.

How do I decode a Caesar cipher when I do not know the shift?

There are only 25 possible shifts, so you can simply try them all. Open the brute-force table to see every shift from 1 to 25 at once, then pick the line that reads as plain text. This is why the Caesar cipher offers no real security.

Is the Caesar cipher secure encryption?

No. The Caesar cipher is a classical cipher meant for puzzles, history and learning, not for protecting secrets. With only 25 possible keys it can be broken instantly by trying every shift, and it falls to simple frequency analysis. For real protection use a tool that applies modern, password-based encryption such as AES.

Is my text private?

Yes. The encoding and decoding run entirely in your browser. Your text is never uploaded to a server and nothing is stored.

Related tools