ROT13 Cipher
ROT13 — the 13-letter Cæsar cipher. Each letter is replaced by the one 13 positions later in the alphabet. Encoding and decoding are the same operation.
Hello World → Uryyb Jbeyq
ROT13 — the 13-letter Cæsar cipher. Each letter is replaced by the one 13 positions later in the alphabet. Encoding and decoding are the same operation.
Hello World → Uryyb Jbeyq
ROT13 ("rotate by 13") is a Cæsar cipher that shifts every letter by 13 positions in the alphabet. Because the English alphabet has 26 letters, applying ROT13 twice returns the original text — encoding and decoding are the same operation.
It's not real cryptography (anyone can decode it instantly), but it's been the standard way to hide spoilers, punchlines, and answers on Usenet, forums, and chat platforms since the 1980s.
Posting a movie or TV plot point? ROT13-encode it. Readers who want the spoiler can decode; everyone else sees gibberish and skips.
Set up a joke in plain text, ROT13 the punchline. Readers who want it decode; the rest move on.
Quiz answers, puzzle solutions, riddle reveals — ROT13 lets you publish the answer below the question without it being visible to skimmers.
The simplest possible example of a substitution cipher. Demonstrates the principle without overwhelming the learner.
ROT13'd content in a comment is unsearchable as plain text — useful as a notes-to-self area or to bypass crude content filters.
No, not for any real privacy purpose — anyone can decode it in seconds. Use it only for casually hiding content from accidental viewing.
No — only A–Z and a–z are shifted. Numbers, spaces, punctuation, and other characters pass through unchanged.
13 + 13 = 26, and 26 mod 26 = 0 — back to the start. ROT13 is its own inverse, which is why both encode and decode use the same operation.
ROT13 is one of 25 possible Cæsar ciphers (shifts of 1 through 25). ROT13 is uniquely useful because of the symmetric encode/decode property.