Caesar Cipher / ROT13
100% private — runs on your device, never uploaded. Works offline once loaded.
Encode or decode a Caesar shift cipher with any shift amount — the default of 13 gives you classic ROT13. Case and non-letters are preserved, and output updates live as you type. Everything runs in your browser.
What a Caesar cipher does
The Caesar cipher is one of the oldest known encryption techniques, named after Julius Caesar, who reportedly used it to protect military messages. It works by shifting each letter of the alphabet a fixed number of positions: with a shift of 3, A becomes D, B becomes E, and so on, wrapping around so that X, Y and Z loop back to A, B and C. Decoding simply shifts in the opposite direction.
This tool preserves the character of your text as it transforms it. Uppercase letters stay uppercase, lowercase stay lowercase, and anything that isn't a letter — digits, spaces, punctuation, emoji — passes straight through untouched. That's what keeps the output readable and lets you cipher a sentence without mangling its structure.
ROT13, the special case
Set the shift to 13 and you get ROT13, the internet's favourite lightweight obfuscation. Because 13 is exactly half of 26, shifting by 13 twice brings every letter back to where it started — which means ROT13 is its own inverse. The same button both scrambles and unscrambles, with no need to track direction.
ROT13 has never been about real security. It's used to hide spoilers, puzzle answers, joke punchlines and mildly offensive material in forums and newsgroups — present enough to stop you reading by accident, trivial enough to reverse the moment you want to.
Why it isn't real encryption
A Caesar cipher has only 25 possible shifts, so anyone can crack it by trying them all — a technique called brute force — in seconds. It's also vulnerable to frequency analysis: in English, E is the most common letter, so spotting the most frequent letter in the ciphertext usually reveals the shift immediately.
Use this tool for the things it's genuinely good at, rather than protecting anything sensitive:
- Learning how substitution ciphers and modular arithmetic work.
- Hiding spoilers, answers or surprises so they're not read by accident.
- Puzzle hunts, escape rooms, geocaching and CTF challenges.
- Classroom demonstrations of cryptography basics before moving on to modern algorithms.
Frequently asked questions
What shift should I use?
Any whole number from -25 to 25. The default 13 gives ROT13; a shift of 3 recreates Caesar's own historical cipher. Sender and recipient just need to agree on the same number.
Why does Encode with shift 13 look the same as Decode?
For a shift of 13 specifically, encoding and decoding are identical operations because 13 is half of 26 — that's the defining quirk of ROT13. For any other shift, Encode and Decode move in opposite directions.
Does it work on numbers?
Digits are left unchanged by default, which keeps the classic Caesar behaviour. If you need to shift numbers too, you'd want a different cipher variant such as ROT47.
Is this secure enough to protect a password?
No. A Caesar cipher is trivially broken and offers no real protection. Use it for fun and learning, and use proper encryption for anything that actually needs to stay private.
Can I decode a message if I don't know the shift?
You can try each shift from 1 to 25 and watch for the one that produces readable text — with only 25 options it takes moments. That ease of cracking is exactly why the cipher is considered insecure.
Does the output update automatically?
Yes. The result recomputes live as you type or change the shift, so there's no button to press — just copy the output when it looks right.
Advertisement