ROT13 Encoder & Decoder

Apply ROT13 to encode or decode text instantly — the same operation works both ways.

Your result will appear here...
💡 Tip: ROT13 is a Caesar cipher with shift = 13. Applying it twice returns the original text, so the same tool encodes and decodes.

What is ROT13?

ROT13 (“rotate by 13 places”) is a simple letter substitution cipher that replaces each letter with the letter 13 positions after it in the alphabet. It is a special case of the Caesar cipher with a fixed shift of 13.

Because the English alphabet has 26 letters, applying ROT13 twice returns the original text. This self-inverse property is why a single function both encodes and decodes ROT13 messages.

How ROT13 Works

Mapping (A↔N, B↔O, …, M↔Z):

Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Cipher: N O P Q R S T U V W X Y Z A B C D E F G H I J K L M

Example:

Plaintext: HELLO WORLD
Ciphertext: URYYB JBEYQ

Mathematical Formula

ROT13(x) = (x + 13) mod 26
Encoding and decoding are identical: ROT13(ROT13(x)) = x.

History and Common Uses

Origin

ROT13 became widely used on Usenet in the early 1980s. It was adopted as a community convention to obscure spoilers, punchlines, and offensive jokes — readers had to deliberately decode the text to view it.

Modern Usage

  • Hiding spoilers and answers in online forums and puzzles
  • CTF (Capture The Flag) challenges and beginner cryptography exercises
  • Lightweight obfuscation in source code comments
  • The Unix “tr” command and the Emacs M-x rot13-region shortcut

ROT13 Security

ROT13 provides no cryptographic security:

  • The shift is fixed and publicly known (13).
  • Letter frequencies are preserved — “E” in plaintext maps to “R”.
  • Word lengths and patterns are unchanged.
  • Treat it as obfuscation, not encryption.