Skip to content

Caesar Cipher

Encode or decode text with a Caesar shift cipher, including ROT13.

Processed locally in your browser.

A shift of 13 is ROT13.

How does a Caesar cipher work?

Each letter moves forward by the shift, wrapping Z to A: with shift n, the letter at position p becomes (p + n) mod 26. Decoding shifts back by the same amount. For example, with a shift of 3, "Hello, World!" becomes "Khoor, Zruog!". A shift of 13 is ROT13, which reverses itself. Letters keep their case.

Understanding your result

The Caesar cipher is one of the oldest known ciphers, named after Julius Caesar. Because there are only 25 possible shifts, it offers no real security and is easily broken — it is best treated as a puzzle or a light way to obscure text such as spoilers, not as encryption.

Formula and method

Each letter moves forward by the shift (wrapping Z to A); decoding shifts back by the same amount. With shift n, the letter at position p becomes (p + n) mod 26.

Worked example

With a shift of 3, "Hello, World!" becomes "Khoor, Zruog!"; decoding with shift 3 returns the original.

How to use this tool

  1. Type or paste your text.
  2. Choose encode or decode and a shift amount.
  3. Copy the converted text.

Common mistakes to avoid

  • Expecting it to be secure — it is trivially cracked.
  • Using the wrong direction; decode needs the same shift as encode.
  • Assuming numbers or symbols are shifted — only letters change.

About the Caesar Cipher

The Caesar Cipher tool shifts each letter of your text a fixed number of places through the alphabet to encode or decode it. A shift of 13 is the well-known ROT13, which reverses itself.

Who should use this tool

Students, puzzle fans, teachers and anyone exploring classic ciphers.

Benefits

  • Encode and decode with any shift from 0 to 25.
  • Built-in ROT13 (shift 13).
  • Keeps letter case; leaves numbers and punctuation alone.
  • Private — your text never leaves the browser.

Practical use cases

  • Solving or creating Caesar-cipher puzzles.
  • Hiding spoilers or answers with ROT13.
  • Teaching how substitution ciphers work.

Explore all Text and Writing tools

Frequently asked questions

What is ROT13?

ROT13 is a Caesar cipher with a shift of 13. Because 13 is half of 26, applying it twice returns the original text.

Is a Caesar cipher secure?

No. With only 25 possible shifts it can be broken almost instantly, so use it for puzzles, not for protecting sensitive data.

Does it change numbers and punctuation?

No. Only letters are shifted; digits, spaces and punctuation are left exactly as they are.

Share this tool

Free to use — copy the link, share it anywhere, or add the tool to your own website.

Embed this tool on your site (free)

Copy this code and paste it into any web page — it stays free and always up to date: