Caesar Cipher

Type a message, choose a shift and encrypt or decrypt it, or list all 25 shifts to crack it.

Caesar cipher

What this tool does

A Caesar cipher replaces each letter with the one a fixed number of places further along the alphabet. With a shift of 3, A becomes D and "Hello" becomes "Khoor". Type your text, choose the shift and direction, and read the result. Tick "Show all 25 shifts" to decode a message when you do not know the key.

Shifts every letter by the number you choose, wrapping from Z back to A.

Optionally lists the result of all 25 shifts so you can spot the readable one.

How to use it

  1. Type or paste your text.
  2. Choose Encrypt or Decrypt and set the shift.
  3. Read the result; case, digits and punctuation are unchanged.
  4. Tick "Show all 25 shifts" if you do not know the key.

Why use this tool

Encrypts and decrypts with any shift from 1 to 25 and can show all 25 possible shifts at once, which is how you crack a Caesar message without the key. The Caesar cipher is the classic first cipher, used in puzzles, escape rooms, geocaching and classes on how encryption works. A tool avoids counting letters by hand and makes the brute-force attack, which is how the cipher is broken, a one-click task.

Why we built it

We built the Caesar cipher tool to show all 25 shifts at once, which is how a message is cracked without the key. Compare with ROT13 and the Morse code translator.

For a neighbouring job there is also the NATO Phonetic Alphabet Converter.

Who this tool is for

  • Puzzle solvers and escape-room designers
  • Students learning cryptography
  • Teachers making a classroom activity

When to use it

  • Solving a puzzle, geocache or escape-room clue.
  • Teaching or learning basic cryptography.
  • Checking a worked example.
  • Making a simple coded message for a game.

How it works

Each letter is moved forward by the shift, modulo 26: with a shift of 3, X, Y and Z wrap to A, B and C. Decrypting moves each letter back by the same amount. A shift of 13 is ROT13, which is its own inverse.

Because there are only 25 useful shifts, the cipher is trivially broken: try them all and look for the one that reads as words. That is what the all-shifts table does. Julius Caesar is reported to have used a shift of 3 for military messages.

A Caesar cipher provides no real security. Use proper encryption for anything that matters.

What you give it, and what you get back

Input and output of Caesar Cipher
ItemDetails
TextAny text; only the 26 letters A-Z are changed.
Direction and shiftEncrypt or decrypt, and a shift from 1 to 25.
OutputThe shifted text, and optionally all 25 shifts in a table.

Issues you may run into

Common problems with Caesar Cipher
What you seeWhy it happensWhat to do
The output is still unreadableThe shift or the direction is wrong.Show all 25 shifts and look for the readable line.
Accented letters did not changeOnly A-Z are shifted.Remove or transliterate accents first.
Digits did not changeThe Caesar cipher only rotates letters.Use ROT13 with the digit option for numbers.

Assumptions and limitations

Frequently asked questions

What is a Caesar cipher?

A substitution cipher that replaces each letter with the one a fixed number of positions further down the alphabet.

How do I decode a Caesar cipher without the key?

Try every shift from 1 to 25 and pick the one that gives readable text. Tick "Show all 25 shifts" to see them together.

What shift did Julius Caesar use?

Accounts say he used a shift of 3.

Is a Caesar cipher secure?

No. With only 25 possible keys it is broken in seconds.

What is the difference between Caesar and ROT13?

ROT13 is a Caesar cipher with a shift of 13, so applying it twice gives the original.

Is my text or file sent anywhere?

No. Everything runs in your browser and nothing leaves the page.