Caesar Cipher

A Caesar cipher replaces each letter with the one a fixed number of places further along the alphabet. Choose a shift to encode or decode a message, or show all 25 shifts at once to crack a message when you don’t know the key.

0 words · 0 characters

Example

Encoded with a shift of 3: A becomes D, B becomes E

Before
Meet me at noon
After
Phhw ph dw qrrq

How the cipher works

Pick a shift, say 3. Every A becomes D, every B becomes E, and so on. Letters near the end wrap around to the start, so X becomes A, Y becomes B and Z becomes C. To decode, shift back by the same amount. The shift is the key: both people need to know it.

This tool shifts the 26 letters A to Z and keeps upper and lower case as you typed them. Spaces, digits, punctuation and accented letters are not changed.

ROT13

ROT13 is the Caesar cipher with a shift of 13. Because the alphabet has 26 letters, shifting by 13 twice brings you back to the start, so the same operation both encodes and decodes. It has long been used online to hide spoilers, puzzle answers and punchlines from a casual glance.

Cracking a message without the key

There are only 25 possible shifts, so a Caesar cipher can be broken by trying them all. Paste the message and tick Show all 25 shifts. The result lists every possible decoding, labeled with its shift, and the correct one is the line that reads as real words. Line breaks in the message are replaced by spaces in this view so each shift stays on one line.

On longer messages you can also guess the shift by counting letters: E is the most common letter in English, so the most common letter in the coded text often stands for E. The Word Frequency Counter helps with repeated words.

Where it comes from, and why not to rely on it

The cipher is named after Julius Caesar, who according to the Roman historian Suetonius used a shift of three in his private letters. It is a good first lesson in cryptography and fun for escape rooms, scavenger hunts and geocaching puzzles.

It gives no real security. Anyone can undo it in seconds, as the “all 25 shifts” option shows. To protect an account, use a long random password from the Password Generator instead.

Frequently asked questions

How do I decode a Caesar cipher?

Paste the coded text, set Direction to Decode, and choose the shift that was used to encode it. If you don’t know the shift, tick “Show all 25 shifts” and pick the line that makes sense.

What shift did Julius Caesar use?

A shift of three, according to Suetonius: A was written as D, B as E, and so on. That is the default setting on this page.

What is ROT13?

A Caesar cipher with a shift of 13. Applying it twice returns the original text, so encoding and decoding are the same step. Choose 13 in the Shift menu to use it.

Does the cipher change numbers and punctuation?

No. Only the letters A to Z are shifted. Digits, spaces, punctuation and accented letters stay exactly as they are.

Is a Caesar cipher secure?

No. With only 25 possible keys it can be broken by hand in a few minutes. Use it for games and learning, not for anything private.