Skip to main content
Substitution ciphers100% FreeInstant

Caesar Cipher: Encode, Decode and Crack Any Shift

This free Caesar cipher tool shifts every letter of your text by a fixed number of places. Encrypt, decrypt, or try all 25 shifts at once to break a message when the shift is unknown.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

The Caesar cipher is named after Julius Caesar, who is said to have used a shift of three to send private messages. It is the classic first cipher: easy to understand and easy to break. It appears in puzzles, escape rooms, geocaching and programming exercises.

Enter your text and a shift. To crack a message when you do not know the shift, turn on brute force and look for the line that reads as normal language.

How to Use This Tool

  1. Type or paste your text.
  2. Enter the shift and choose encrypt or decrypt.
  3. Optionally turn on the brute force table.
  4. Press Run and copy the result.

How the Calculation Works

Each letter is given a number from 0 to 25. Encryption adds the shift and wraps around after Z, and decryption subtracts it. In other words, new letter = (letter + shift) mod 26. Letters keep their case, and everything else is left alone.

Worked Example

With a shift of 3, HELLO becomes KHOOR. Decrypting KHOOR with a shift of 3 gives HELLO. A shift of 13 is called ROT13 and is its own inverse.

Common Uses

  • Puzzles and escape rooms.
  • Geocaching hints.
  • Teaching cryptography.
  • Programming exercises.

Tips and Common Mistakes

  • Use brute force when the shift is unknown.
  • A shift of 13 gives ROT13.
  • Frequent letters such as E and T help you guess the shift by hand.

Next, you may need the Atbash cipher, Vigenère cipher, affine cipher, rail fence cipher.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

One of the oldest ciphers. Each letter is replaced by the letter a fixed number of places further along the alphabet. With a shift of 3, A becomes D.
There are only 25 possible shifts, so you can try them all in seconds. The brute force option does exactly that.
No. Digits, spaces and punctuation stay as they are, and upper and lower case are kept.
No. It is for puzzles and teaching. Never use it to protect real secrets.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.