ROT13 Cipher Encoder / Decoder

ROT13 is a special case of the Caesar cipher that shifts each letter by 13 positions. Because the alphabet has 26 letters, applying ROT13 twice gives you back the original text. Use this tool to encode or decode instantly.

Letters A–Z and a–z are rotated. Numbers, punctuation, emojis and other characters are left unchanged.

How ROT13 works

For letters A–Z:

\( \text{ROT13}(x) = (x - 'A' + 13) \bmod 26 + 'A' \)

For letters a–z:

\( \text{ROT13}(x) = (x - 'a' + 13) \bmod 26 + 'a' \)

Because applying ROT13 twice returns the original message, you don't need to know whether the text is “encoded” or “decoded”: just run ROT13 and it flips it.

Common uses

  • Hide spoilers or puzzle answers.
  • Obfuscate email addresses or quick strings.
  • Simple classroom demos of substitution ciphers.