Shard Tools

Caesar Cipher

Encode or decode a Caesar cipher with any shift in your browser.

Maintained by Roshan.

Use Caesar Cipher

Converts text to shifted text in this tab, with nothing sent anywhere.

Runs entirely on your deviceThe conversion happens in this browser tab. Nothing you type is uploaded, logged or stored, which is worth knowing for anything you would not paste into a search box.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About Caesar Cipher

The Caesar cipher is the oldest and most famous of the substitution ciphers, named for the Roman general who used it, and it is the natural next step from ROT13: instead of a fixed rotation of thirteen, you choose the shift. Each letter moves a set number of places through the alphabet, wrapping around at the end. It remains a favourite for teaching, for puzzles, and for escape rooms and treasure hunts, precisely because it is simple enough to do by hand yet just obscure enough to be fun. To decode a message you shift by the same amount in the opposite direction, which here is as easy as entering a negative number. Like ROT13, it touches only letters and leaves the rest of the text alone.

Using Caesar Cipher

  1. Each letter is shifted forward through the alphabet by the amount you set, wrapping from Z back to A.
  2. A negative shift moves letters backward, which is how you decode a message encoded with the matching positive shift.
  3. The shift is taken modulo 26, so a value of 27 behaves like 1 and there is no need to keep it in range.
  4. Case is preserved and non-letters - numbers, punctuation, spaces - are passed through untouched.
  5. A shift of 13 reproduces ROT13 exactly, since ROT13 is simply the Caesar cipher at that setting.

Where caesar cipher helps

Setting a puzzle

Choose a shift, encode the clue, and give solvers the number - or let them work it out, since there are only 25 to try.

Decoding a found message

Enter the shift as a negative number to reverse it, or try shifts until the text reads correctly.

Before you use the result

Questions about Caesar Cipher

How do I decode a Caesar cipher?

Shift by the same amount in the opposite direction. Enter the shift as a negative number here, or try values until it reads.

Is it the same as ROT13?

ROT13 is the Caesar cipher with a shift of 13. This tool lets you pick any shift.

Is it secure?

No. There are only 25 shifts, so it can be brute-forced almost instantly. It is for puzzles and teaching.

What happens to numbers and punctuation?

They are left unchanged. Only letters are shifted.

Is my text sent anywhere?

No. The cipher runs in this tab.

Related tools

ROT13 Encoder and Decoder

Apply ROT13 to text in your browser. The same operation encodes and decodes, since it is its own inverse.

Text to Binary

Convert text to binary in your browser. Each character becomes its UTF-8 bytes, grouped for readability.

Base32 Encode

Encode text to Base32 in your browser. Uses the standard RFC 4648 alphabet.