Advertisement

ROT13 Cipher

A Caesar cipher with fixed shift of 13 that is its own inverse for the 26-letter Latin alphabet.

Learn

A Caesar cipher with fixed shift of 13 that is its own inverse for the 26-letter Latin alphabet.

ROT13 replaces each letter with the letter 13 positions after it in the alphabet, wrapping around: A↔N, B↔O, C↔P, ..., M↔Z. Because 13 is exactly half of 26, applying ROT13 twice returns the original text — the cipher is its own inverse. Case and non-letter characters are left unchanged. ROT13 provides essentially no cryptographic security; it is used as a light obfuscation to hide spoilers, punchlines, or mild offensive material.

E(x) = (x + 13) mod 26, applied letter-by-letter

  • HELLO → URYYB
  • CLAUDE → PYNHQR
  • ROT13(ROT13(x)) = x

How to recognize it

  • Every letter is shifted by the same amount
  • Applying the transformation twice returns the original
  • A↔N, B↔O, C↔P are the classic letter pairs

Common mistakes

  • Confusing ROT13 with atbash (which reverses the alphabet A↔Z, B↔Y, ...)
  • Applying the shift to digits or punctuation
  • Shifting by 12 or 14 instead of exactly 13

Practice guidance

Coding & Decoding

Advertisement