Caesar Cipher Tool

Encrypt and decrypt with the Caesar cipher using any shift, ROT13, or your own custom alphabet, then see how easily it is broken with a frequency chart and ranked brute force.
100% client-side · A classical cipher for learning, not for real secrets

In the Cipher tab this is the text to encrypt or decrypt. In the Frequency and Brute force tabs, treat it as the ciphertext you are analyzing.
Operation

0
Characters shifted
0
Characters
0
Words

The Caesar cipher has only 25 useful keys and can be broken in an instant. Use it to learn or for puzzles, never to protect real information.

How the Caesar Cipher Works

Write the alphabet twice, the second copy slid along by the shift. With a shift of 3, A B C ... X Y Z lines up with D E F ... A B C, so HELLO becomes KHOOR. Decrypting slides the copy back the other way. Mathematically, encryption is E(x) = (x + n) mod 26 and decryption is D(x) = (x - n) mod 26.

There are only 25 shifts worth trying, and the cipher never hides which letters are common, so a few seconds of brute force or a glance at a frequency chart gives the message away. That makes it a perfect first step into cryptography, and a useful reminder of why modern ciphers need keys far too large to try one by one.

Live Results

Results update as you type, with the shifted alphabet shown and a ROT13 button

Three Real Modes

Standard letters, letters plus digits, or a working custom alphabet

Frequency Chart

Compare your text with typical English and see the likely shift

Ranked Brute Force

Every shift is tried and sorted, with the likeliest plaintext first

Honest Limits

Warns when there is too little text for a reliable answer

Private by Design

Runs in your browser. Nothing is uploaded, saved or logged

Frequently Asked Questions

1. What is the Caesar cipher?

The Caesar cipher is one of the oldest and simplest ciphers. Each letter is replaced by the letter a fixed number of places further along the alphabet, wrapping around from Z back to A. With a shift of 3, A becomes D, B becomes E and HELLO becomes KHOOR. It is named after Julius Caesar, who according to the Roman historian Suetonius used a shift of three to protect his private letters.

2. How do I encrypt and decrypt a message?

Number the letters A = 0 to Z = 25. To encrypt, add the shift and take the remainder after dividing by 26; to decrypt, subtract it. Choose Encrypt or Decrypt, set the shift, and the result updates as you type. To decrypt a message you must use the same shift that encrypted it, or use the Brute force tab if you do not know it.

3. What do the Standard, Extended and Custom modes do?

Standard shifts the letters A-Z and a-z and leaves everything else alone. Extended also shifts digits, but within their own ring of ten (0-9), so the digit shift is the shift modulo 10 and a digit never turns into a letter. Custom lets you type your own alphabet, such as letters and digits together or all printable ASCII characters, and shifts within it; characters that are not in your alphabet pass through unchanged. Every character in a custom alphabet must be different.

4. What is ROT13?

ROT13 is the Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying it twice returns the original text, so the same operation both encrypts and decrypts. It is not used for security but to hide spoilers, puzzle answers and jokes from a casual glance. The ROT13 button sets the shift to 13 in Standard mode.

5. How secure is the Caesar cipher?

Not at all. There are only 25 useful shifts (a shift of 0 or 26 changes nothing), so anyone can try them all in seconds, and it keeps the letter-frequency pattern of the language, so frequency analysis breaks it as well. It is a teaching tool and a puzzle cipher. For real secrets use a modern cipher such as AES.

6. How does the tool find the shift of an unknown message?

It decrypts the text with every possible shift and scores each result by how closely its letter counts match typical English (a chi-squared score, where lower is better). The Brute force tab ranks the shifts that way and highlights the best one, and the Frequency tab shows the likely shift. This needs a reasonable amount of text: with fewer than about 15 letters the ranking is a guess, so check the top few results yourself. It also assumes the message is in English.

7. How are spaces, punctuation, case and accented letters handled?

Spaces, punctuation and symbols pass through unchanged, and upper and lower case are kept. Letters outside A-Z, such as é, ñ or Greek and Cyrillic letters, are not part of the standard alphabet, so they are left as they are unless you include them in a custom alphabet.

8. Is my text sent or stored anywhere?

No. Everything runs in your browser, the page's content security policy blocks outgoing network requests, and nothing you type is saved: there is no history and no local storage. The only thing the site remembers is your language choice for the menu.