The idea in one sentence
ROT13 replaces every letter with the one 13 positions later in the alphabet. A→N, B→O, C→P, and so on. When you reach Z, it wraps back to the start — so N→A, O→B, P→C.
Example
Input
Hello, World!
ROT13 output
Uryyb, Jbeyq!
ROT13 again
Hello, World!
Numbers, spaces, and punctuation are never changed — only letters.
Why applying it twice restores the original
The alphabet has 26 letters. ROT13 shifts by 13 — exactly half. Shift by 13 twice and you've shifted by 26, which lands you back where you started.
This makes ROT13 its own inverse: the same operation encodes and decodes. There's no "decode mode" — just run ROT13 again.
The math
A (position 1) + 13 = N (position 14)
N (position 14) + 13 = 27 → mod 26 = 1 = A
ROT13(ROT13(x)) = x
The full substitution table
Every letter and its ROT13 pair. The relationship is symmetric — the same table works in both directions.
| Plain | ROT13 | Plain | ROT13 |
|---|---|---|---|
| A | N | N | A |
| B | O | O | B |
| C | P | P | C |
| D | Q | Q | D |
| E | R | R | E |
| F | S | S | F |
| G | T | T | G |
| H | U | U | H |
| I | V | V | I |
| J | W | W | J |
| K | X | X | K |
| L | Y | Y | L |
| M | Z | Z | M |
More examples
Hello
Uryyb
Why did the chicken cross the road?
Jul qvq gur puvpxra pebff gur ebnq?
Spoiler: he was dead the whole time
Fcbvyre: ur jnf qrnq gur jubyr gvzr
Secret message
Frperg zrffntr
Where ROT13 is used today
Hiding spoilers online
The original use case on Usenet in the 1980s — still used on Reddit, forums, and some blogs. Rot the spoiler text so readers have to actively decode it. No intent to deceive, just voluntary obscuration.
Obfuscating email addresses
Some sites display contact addresses in ROT13 to slow down spam scrapers. The user decodes it mentally or with a tool. Not foolproof against modern scrapers, but adds friction.
Puzzle games and ARGs
Alternate Reality Games and puzzle hunts frequently use ROT13 as a layer in multi-step ciphers. It's recognizable enough to be satisfying to solve, common enough that players know to check for it.
Developer jokes and Easter eggs
"Uryyb Jbeyq" in source code comments is a classic gag. Some Unix/Linux systems historically used ROT13 in fortune cookie programs and man page easter eggs.
ROT13 vs Caesar cipher vs encryption
ROT13
Caesar cipher
Modern encryption (AES, RSA)
ROT13 provides no security against anyone who knows what it is. Use it to obscure, not to protect.