๐Ÿ”งToolify

Caesar Cipher Encoder / Decoder (with ROT13)

Type text and pick a shift amount. Letters are rotated by that many positions in the alphabet (A-Z, a-z); other characters pass through unchanged. Use shift=13 for ROT13, shift=3 for the original Caesar.

Output
Khoor, Zruog!

How it works

How the Caesar cipher works

Each letter in the input is replaced by a letter a fixed number of positions later in the alphabet. With shift +3, A becomes D, B becomes E, โ€ฆ, X becomes A (wrapping around). Non-letters pass through unchanged. Decoding is the same process with the opposite sign.

Named after Julius Caesar, who reportedly used a +3 shift for military messages. The shift size is the only secret. With only 26 possible shifts, it's trivially broken by trying them all โ€” but it's an excellent teaching example for substitution ciphers.

ROT13 โ€” the most common variant

ROT13 uses shift=13. Because 13 is half of 26, applying ROT13 twice returns the original text โ€” encoding and decoding use the exact same operation. This made it popular on Usenet and forums for hiding spoilers and offensive jokes; readers can decode by clicking a 'show' button without needing a separate decoder.

ROT13 is not encryption in any meaningful sense. It's obfuscation โ€” the equivalent of writing 'spoiler hidden below' so people who don't want to know can skip it.

Why this is fun, not secure

Modern attackers break a Caesar cipher in microseconds by frequency analysis (E is the most common letter in English; whatever maps to a frequent letter in the ciphertext is probably E). Don't use it for anything you care about.

Use it for: educational examples, puzzle games, ARGs (alternate reality games), hiding text in plain sight, ROT13 spoiler tags. Don't use it for: passwords, financial data, anything with consequences.

Frequently asked questions

โ€บWhat's the difference between Caesar +3 and ROT13?

Just the shift amount. +3 is Caesar's original choice; 13 is exactly half the alphabet (so encoding and decoding are the same operation). Mathematically they're the same family of cipher.

โ€บWhy does shift +26 give the same text back?

26 letters in the alphabet โ€” shifting by exactly 26 lands you on the original letter. Same for any multiple of 26.

โ€บWhy is ROT13 used for spoilers?

Because applying ROT13 twice returns the original. Forums and Usenet readers had built-in 'rot13 this text' buttons that worked for both directions. Convenient for hiding then revealing text.

โ€บDoes this handle non-Latin alphabets?

No โ€” only A-Z and a-z. Cyrillic, Greek, CJK, and Arabic pass through unchanged. The Caesar cipher is intrinsically Latin-alphabet-specific.

โ€บCan I use this for real security?

Absolutely not. With 25 possible shifts (excluding 0 and 26), a computer breaks it instantly. Use AES, RSA, or established cryptographic libraries for real security.

โ€บWhat about Vigenรจre cipher?

A more advanced classical cipher using a keyword to vary the shift per letter. Still breakable by hand with enough text, but much harder than Caesar. We don't include it (yet).

โ€บWhy include negative shifts?

Convenience. Encoding with +3 and decoding with +3 is wrong; you need -3 to decode. Negative shifts let you decode without switching modes (or the toggle does it for you).

โ€บDoes the data leave my browser?

No. Encoding and decoding run locally; nothing is sent to a server.

Related tools

Last updated:

Try our AI prompts โ†’