Caesar Cipher & ROT13 Generator

Encrypt or decrypt text with a Caesar cipher (choose your own shift amount) or ROT13. Only letters are shifted — numbers, symbols, and other characters are left untouched. Conversion happens entirely in your browser; nothing you enter is sent to a server.

Shift amount (0-25)
Mode


          
          Copied!
        

What are Caesar ciphers and ROT13?

The Caesar cipher is one of the oldest and simplest ciphers, replacing each letter with one a fixed number of positions further along the alphabet. With a shift of 3, for instance, A becomes D and B becomes E (wrapping back to A after Z). ROT13 is a special case of the Caesar cipher with the shift permanently fixed at 13 — exactly half of the 26-letter alphabet — which gives it the handy property that applying the same transformation a second time returns the original text (encryption and decryption are the same operation).

What is the Caesar cipher?

The Caesar cipher is a type of "substitution cipher" that replaces each letter of the plaintext (the original message) with another letter a fixed number of positions further along (or back) in the alphabet. That number of positions — the shift — is the key to breaking the code: as long as the sender and receiver agree on the same shift, the ciphertext can always be turned back into the original message. This tool lets you encrypt or decrypt with any shift from 0 to 25, and you can switch to ROT13 — the special case where the shift is fixed at 13 — with a single click.

Only basic Latin letters (A-Z, a-z) are affected; uppercase and lowercase are preserved exactly as entered, and numbers, symbols, spaces, and non-Latin characters are left completely untouched. Every step, from input to output, runs in JavaScript inside your browser, so you can check the result instantly without ever sending the text you want to encrypt or decrypt to a server.

How to use the Caesar cipher generator

  1. Choose a mode Pick "Encrypt" or "Decrypt". Decryption simply shifts in the opposite direction, so entering the same shift amount restores the original text.
  2. Set the shift amount Enter a value from 0 to 25 for how far to shift each letter. To use ROT13, just click "Use ROT13" and the shift is set to 13 automatically.
  3. Type your text Enter the text you want to encrypt or decrypt in the text box. The converted result updates below in real time as you type.
  4. Copy the result Click "Copy" to copy the converted text to your clipboard. Use "Clear" any time you want to start over with an empty input.

Tips for getting more out of it

  • ROT13 has long been used on internet forums and message boards as a light obfuscation to hide spoilers or answers from anyone who doesn't want to see them yet. It's not real security — just a way to keep something from catching your eye by accident.
  • A shift of 26 produces text identical to the input, since it cycles the 26-letter alphabet exactly once around. A shift of 0 behaves the same way.
  • In "Decrypt" mode, entering the same shift amount used during encryption restores the original plaintext. You can flip between modes without changing the shift to see how it behaves.
  • Uppercase and lowercase letters are shifted independently and keep their case (encrypting A gives D, encrypting a gives d — the case itself never changes).

When the Caesar cipher generator comes in handy

Learning cryptography and information security basics

See fundamental ideas like plaintext, ciphertext, keys (the shift amount), and brute-force attacks play out on real letters as they get replaced — useful as classroom or self-study material.

Hiding spoilers and light obfuscation

Use ROT13 to keep quiz answers or spoilers unreadable at a glance, letting only readers who choose to decrypt them see the content — a long-standing forum and message-board tradition.

Setting or solving CTF and cipher puzzles

Create shifted ciphertext to challenge friends or students, or run a mystery ciphertext through every possible shift yourself to crack it by trial.

Comparing against more advanced ciphers

Once you feel the weakness of a single fixed shift, compare it with the Vigenère cipher tool, which cycles through several shifts based on a keyword, or the Enigma cipher tool, which encrypts using rotor mechanisms, to see how ciphers evolved.

Caesar cipher glossary

Caesar cipher
One of the oldest substitution ciphers, replacing every letter with another a fixed number of positions away. Sender and receiver share that shift amount as the key to exchange encrypted messages.
Shift cipher
Another name for the Caesar cipher, emphasizing that letters are "shifted" by a fixed amount. Caesar cipher, shift cipher, and additive cipher all refer to the same underlying scheme.
Substitution cipher
A general term for any cipher that encrypts by replacing each letter of the plaintext with another letter. The Caesar cipher is the simplest kind, applying the same fixed shift to every letter.
Brute-force attack
Trying every possible key value one by one until the cipher breaks. Since a Caesar cipher only has 26 possible shifts (0-25), a computer can crack it instantly, and even by hand it takes just minutes.
ROT13
A special Caesar cipher with the shift permanently fixed at 13. Because it moves the 26-letter alphabet exactly halfway around, applying the same transformation twice returns the original text, so encryption and decryption are the same operation.
Plaintext and ciphertext
"Plaintext" is the original message before encryption; "ciphertext" is the unreadable result after encryption. With the Caesar cipher, the length never changes — each letter is simply replaced by another.
Key
The parameter that determines the rule for encrypting and decrypting. In the Caesar cipher this is the shift amount; without sharing the same key, sender and receiver cannot decrypt correctly.

Frequently Asked Questions

Since there are only 26 possible shift values (0 through 25), a Caesar cipher can be brute-forced in seconds. It offers no real security today — it's used purely as an introductory teaching tool for cryptography, or for lightweight obfuscation and fun.

ROT13 is a special case of the Caesar cipher where the shift is always fixed at 13. Since that's exactly half of the 26-letter alphabet, applying the same transformation twice conveniently returns you to the original text.

No. This tool only shifts basic Latin letters (A-Z, a-z); anything else — non-Latin scripts, numbers, symbols, spaces, and so on — passes through unchanged.

No. All encryption and decryption happens in JavaScript running in your browser, and what you enter is never transmitted to any server.
Tool-kun

Side Note — why it's named after Caesar

The Caesar cipher takes its name from Julius Caesar, the ancient Roman statesman and general, who is said to have actually used this method to protect military communications. The Roman historian Suetonius, in his "Lives of the Twelve Caesars," records that Caesar used a shift of three letters in his correspondence with friends.

Its strength as a cipher is negligible by modern standards, but the underlying idea — substituting letters according to a fixed rule — carries historical significance as the ancestor of more sophisticated classical ciphers that followed, such as general substitution ciphers (with a more complex letter-mapping) and the Vigenère cipher (which combines multiple shift amounts).

The Caesar cipher is often the very first cipher introduced in cryptography textbooks, precisely because it's an excellent teaching tool: it lets you grasp fundamental concepts — plaintext, ciphertext, key (the shift amount, in this case), and brute-force attacks — intuitively, without needing complex mathematics.