The ROT Cipher is a simple monoalphabetic substitution cipher that shifts each letter of the plaintext by a fixed number of positions in the alphabet. “ROT” stands for “rotate,” and the most common variant is ROT13, which shifts letters by 13 positions. This means that A becomes N, B becomes O, and so on, wrapping around the alphabet. Because the English alphabet has 26 letters, applying ROT13 twice restores the original text.
The ROT Cipher is often used for obscuring text rather than providing true security. Its simplicity makes it easy to encode and decode without a key, but also makes it trivial to break. Variants can use any rotation number (ROT1, ROT5, ROT13, ROT18, etc.) depending on how many positions letters are shifted.
ROT Cipher: Encoding
To encode a message, shift each plaintext letter forward by the chosen number of positions. Non-alphabetic characters (spaces, punctuation, numbers) are usually left unchanged. For example, using ROT13 to encode HELLO WORLD:
Plaintext: H E L L O W O R L D
Shift: +13 +13 +13 +13 +13 +13 +13 +13 +13 +13
Ciphertext: U R Y Y B J B E Y QROT Cipher: Decoding
Decoding is done by shifting each letter backward by the same number of positions. Using ROT13, the process is identical to encoding:
Ciphertext: U R Y Y B J B E Y Q
Shift: -13 -13 -13 -13 -13 -13 -13 -13 -13 -13
Plaintext: H E L L O W O R L DROT Cipher: Notes
The ROT Cipher’s primary utility is for obfuscation rather than security. ROT13 became widely known on Internet forums to hide spoilers or puzzle answers. It is trivially reversible and demonstrates the fundamental principle of rotation-based substitution ciphers.