Tool to decrypt/encrypt with rot13. ROT-13 cipher is a particular case of the Caesar cipher, where the shift is equal to 13, this allow the cipher to be reciprocal.
ROT-13 Cipher - dCode
Tag(s) : Substitution Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Rot-13 (short for Rotation 13 or Rotate by 13) is the name given to a mono-alphabetical substitution cipher which has the property of being reversible and very simple.
Combining the French/Latin alphabet of 26 letters and an offset of 13, Rot-13 replaces a letter with another located thirteen places further down the alphabet.
Rot-13 coding is popular to hide content because it is easily reversible, indeed, if it is applied twice, then the original message reappears.
This is a special case of the Caesar cipher (and more generally shift ciphers).
From an alphabet, usually the classic 26-letter alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ, each letter is shifted by 13 positions in the English alphabet. Letters beyond Z return to the beginning of the alphabet (as if the alphabet were rotating on itself).
The correspondence table is:
| ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| NOPQRSTUVWXYZABCDEFGHIJKLM |
Example: DCODE is encrypted QPBQR with ROT-13
ROT13 applies only to the 26 unaccented letters of the Latin alphabet (A–Z). Accents are removed, numbers remain the same (unless ROT13.5 is applied), and symbols are removed or ignored.
ROT13 is case-insensitive: uppercase and lowercase letters are transformed independently.
Rot-13 decryption is identical to encryption, due to the reciprocal substituting alphabet used:
| NOPQRSTUVWXYZABCDEFGHIJKLM |
| ABCDEFGHIJKLMNOPQRSTUVWXYZ |
Example: URYYB becomes HELLO.
NB: Rot-13 has the same function for encryption and decryption, it is said to be involutive. In other words, applying the ROT-13 Cipher twice on a text will return it to its original state.
Frequency analysis shows a shift of 13 letters (The E is replaced by an R, which should be the most present letter).
A ROT13 encoded message has a coincidence index (a frequency distribution) identical to that of the plain text, because it is a simple substitution of letters.
The ROT13 code has been widely popularized on Usenet groups and discussion forums, as an anti-spoil method.
Any reference to Friday the 13th, the fear of the number 13 (triskaidekaphobia), the expression baker's dozen (meaning thirteen), the equations A=N or E=R or the three letters EBG (i.e. ROT shifted by 13) are clues.
Rot-13 is in fact a Caesar cipher with a shift of thirteen. As this code only works with letters, it is possible to add the ROT5 to it for the digits (in this case it is sometimes called ROT13.5) or even to use the ROT47 to manage all the ASCII characters.
An offset of 13 allows the encryption to be reversible. The encryption and decryption method are identical. Applying 2 consecutive encryptions (2 shifts of 13) heads to find the original text.
NB: ROT13 does not provide any cryptographic security; it is used only to temporarily hide text.
Applying 2 shifts of 13 represents a shift of 26, and for the Latin alphabet of 26 letters, this amounts to shifting all the letters to their starting point, so in the end, not undergoing any transformation.
ROT13(ROT13(letter)) = letter
The ROT13 cipher does not introduce any new principle compared to the Caesar cipher. It is a special case of it, setting the shift to exactly 13 letters.
The ROT13 principle can be generalized to any alphabet, as long as it is an ordered set of symbols.
However, there is no universal standard for alphabets other than the 26-letter Latin alphabet.
Example: The Greek alphabet (24 letters) would have an equivalent of ROT12
Example: The Cyrillic alphabet (33 letters) would have no equivalent because 33 is an odd number.
dCode retains ownership of the "ROT-13 Cipher" source code. Any algorithm for the "ROT-13 Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "ROT-13 Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "ROT-13 Cipher" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "ROT-13 Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: ROT-13 Cipher on dCode.fr [online website], retrieved on 2025-10-26,