Definition

ROT13 is a special case of Caesar cipher and, as such, is considered a simple substitution cipher. It shifts the plaintext alphabet by half the number of characters in it.

In consequence, applying ROT13 twice to a message yields the original message, as the underlying alphabet is rotated back to its original position. This gives ROT13 the special property of being its own inverse.

Usually, the Latin alphabet (A-Z) holding 26 characters is used as the plaintext alphabet. It is rotated by 13 places, hence the name ROT13.

Plaintext:  abcdefghijklmnopqrstuvwxyz
Ciphertext: nopqrstuvwxyzabcdefghijklm
Substitution alphabet of ROT13

List of common ROT13 variants

Each ROT13 variant listed below shifts its respective alphabet by half its alphabet size and thus shares the property of being its own inverse.

ROT5

ROT5 rotates numbers 0-9, obfuscating numeric values in a message.

Plaintext:  0123456789
Ciphertext: 5678901234
Substitution alphabet of ROT5

ROT18

ROT18 combines ROT13 and ROT5. It rotates letters and numbers separately.

Plaintext:  abcdefghijklmnopqrstuvwxyz0123456789
Ciphertext: nopqrstuvwxyzabcdefghijklm5678901234
Substitution alphabet of ROT18

ROT47

ROT47 uses all ASCII code points that range from 33 to 126 as the plaintext alphabet and rotates it by 47 characters. It can be used to obfuscate lowercase and uppercase letters, numbers, and punctuation symbols.

Plaintext:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
Ciphertext: PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
Substitution alphabet of ROT47

ROT8000

In an attempt to create a ROT13 alternative for other languages, ROT8000 tries to use the full Unicode Basic Multilingual Plane (BMP) category as the plaintext alphabet, which theoretically contains 65,536 characters (or 0x8000 in hexadecimal representation). However, some parts of BMP, including whitespace and invisible control characters, are ignored or skipped, giving us a plaintext alphabet of 63,404 and a shift of 31,702 characters in practice.

Plaintext:  !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
Ciphertext: 簪籥簫簬簭簮簯簰簱簲簳簴簵簶簷簸簹簺簻簼簽簾簿籀籁籂籃籄籅籆籇籈籉籊籋籌籍籎籏籐籑籒籓籔籕籖籗籘籙籚籛籜籝籞籟籠籡籢籣籤籥籥籦籧籨籩籪籫籬籭籮籯籰籱籲米籴籵籶籷籸籹籺类籼籽籾籿粀粁粂粃粄粅粆粇
Substitution alphabet of ROT8000 (only listing the first 94 characters)

To learn more, see the README of the original ROT8000 repository.

Where is ROT13 being used today?

Today, ROT13 is often found on social media platforms as a means of hiding spoilers and problem solutions from a casual glance. It has been described as the “Usenet equivalent of printing an answer to a quiz upside down” as it provides virtually no cryptographic security.

See also

Resources