Free tool

Caesar cipher, shift it, read it, break it.

Type a message and shift every letter along the alphabet, by any amount from 1 to 25, or backwards with a negative number. ROT13 is one click. Paste a coded message and see it read at all 25 shifts at once, with the one that looks like English marked, or use the letter chart to work out the shift yourself. A simple Vigenere cipher with a key word is here too. This is a puzzle and learning tool, and it is not secure.

Your text at all 25 shifts

Each row decodes your text with that shift. Press a row to use it.

Letter chart Your text Result

Shift

Options

Only the letters A to Z are shifted. Digits, accents and other alphabets stay as typed.

A Caesar cipher has only 25 shifts to try, so anyone can read it in seconds. It is for puzzles and learning. Do not use it to hide anything private.

Worked out in your browser. Nothing is uploaded.

How it works

Slide the alphabet, write what lines up.

01 / Shift

A moves to D

With a shift of 3, each letter becomes the letter three places on. X, Y and Z wrap round to A, B and C.

02 / Decode

Shift back

To read a message, shift the other way by the same number. ROT13 is its own reverse, because 13 is half of 26.

03 / Break it

Try all 25

There are only 25 shifts, so the table shows them all and marks the one that reads as English.

Guide

How to use a Caesar cipher, and how to crack one.

A Caesar cipher is a way of scrambling a message by moving every letter a fixed number of places along the alphabet. With a shift of 3, A becomes D, B becomes E and so on, and the end of the alphabet wraps round to the start. This Caesar cipher encoder and decoder works with any shift from 1 to 25 or a negative one, has ROT13 on one button, shows a table of all 25 shifts, and charts the letters in your text so you can break a message by hand. It is a puzzle and learning tool and it is not secure.

How to use the Caesar cipher tool

  1. Type or paste the message into Your text. The Result updates as you type.
  2. Pick Encode to shift forward, or Decode to shift back by the same amount.
  3. Set the Shift in the number box, typing it or using its arrows. Shift 3 and ROT13 are one click.
  4. Under Options, choose whether to keep upper and lower case, keep spaces and punctuation, or put the letters in groups of five, which hides word lengths.
  5. Press Copy on the result. Use the result as the text moves it into the box and flips the direction, so you can check it by going back. Copy link gives a link with your text and settings in it.

Worked examples

Count the letters from A as 0, so H is 7. With a shift of 3, HELLO becomes KHOOR: H (7) plus 3 is 10, which is K; E (4) plus 3 is 7, H; L (11) plus 3 is 14, O; the second L is O again; O (14) plus 3 is 17, R.

Near the end of the alphabet the count wraps at 26. X is 23, and 23 plus 3 is 26, which is 0 after the wrap, so X becomes A. Y becomes B and Z becomes C.

ROT13 shifts by 13. HELLO becomes URYYB: H (7) plus 13 is 20, U; E (4) plus 13 is 17, R; L (11) plus 13 is 24, Y; O (14) plus 13 is 27, which wraps to 1, B. Because 13 plus 13 is 26, running ROT13 twice gives back the original, so one setting both encodes and decodes.

A negative shift goes the other way. A shift of -3 does the same as a shift of 23, since -3 plus 26 is 23. The page says so under the shift box.

How to break a Caesar cipher

There are only 25 useful shifts, so the quick way is to try them all. Paste the coded message into Your text and look at Your text at all 25 shifts. Each row decodes the message with that shift. Read down for the row that is real words. When the text is long enough, the row that reads as English is marked, based on how many of its words are found in a word list. Press the row to put that shift in the tool.

The second method is the letter chart. In a Caesar cipher every plain letter always turns into the same coded letter, so the pattern of tall and short bars is the same as the plain text, only slid along. Find the tallest bar. If you think it stands for E, which is a common guess for English, pick E in Tallest bar stands for and the page works out the shift and offers to decode with it. It needs a longer message to be useful, because a few words do not have a reliable pattern. If the guess fails, try another letter or use the table.

Vigenere, the next step up

Switch to Vigenere key and type a key word. Each letter of the key is a shift: A is 0, B is 1 and so on. The first letter of your text uses the first key letter, the second uses the second, and the key repeats. The key moves on only for letters, so spaces and punctuation do not use it up. With the key LEMON, ATTACKATDAWN becomes LXFOPVEFRNHR: A (0) plus L (11) is L, T (19) plus E (4) is 23, X, T (19) plus M (12) is 31, which wraps to 5, F, and so on. This is the plain Vigenere cipher and it is also not secure. The table of 25 shifts is hidden in this mode, because there is no single shift to find, but the letter chart still works.

What is kept and what is not

  • Only A to Z and a to z are shifted. Digits, accented letters such as é and other alphabets are left exactly as typed.
  • Keep spaces and punctuation is on by default. Turn it off to get letters only, which is how many puzzles are written. Groups of five also removes everything that is not a letter.
  • Turn off Keep upper and lower case to get capitals only.

Is a Caesar cipher secure?

No. With 25 possible shifts, trying all of them takes a moment, and this page does it for you. Vigenere is harder by hand but is also well known to be breakable. Use these ciphers for puzzles, escape rooms, geocaching clues, lessons and fun. For anything private, use real encryption.

If you want numbers instead of shifted letters, try letters to numbers. For dots and dashes, see the Morse code translator, and for spelling words out aloud, the phonetic alphabet translator.

Questions

Good to know.

What is a Caesar cipher?

A cipher that moves each letter a fixed number of places along the alphabet. With a shift of 3, A becomes D and Z wraps round to C.

How do I decode a Caesar cipher without knowing the shift?

Paste it into Your text and read the table of all 25 shifts. One row will be readable. You can also use the letter chart to estimate the shift from the tallest bar.

What is ROT13?

A Caesar cipher with a shift of 13. Since the alphabet has 26 letters, applying ROT13 twice gives back the original, so it encodes and decodes with the same setting.

What does a negative shift do?

It shifts the other way. A shift of -3 gives the same result as a shift of 23, and encoding with -3 is the same as decoding with 3.

Why are my numbers and accents not changed?

Only the 26 letters A to Z are shifted. Digits, accented letters and other alphabets stay as typed.

Is the Caesar cipher secure?

No. There are only 25 shifts to try, so anyone can read it in seconds. It is for puzzles and learning, not for private messages.

What does the Vigenere key do?

Each letter of the key sets the shift for the matching letter of your text, and the key repeats. A is a shift of 0 and Z is 25. It is also not secure.

Is my text sent anywhere?

No. Everything is worked out in your browser. The Copy link button puts your text after the # in the address, which stays in your browser and is not sent to the page.