What is ROT13?
ROT13 replaces each letter with the letter 13 places after it in the alphabet. A becomes N, B becomes O, and so on. After Z it wraps around to A. Numbers, spaces, punctuation and accented letters are left alone, and capital letters stay capital.
Hello, World! becomes Uryyb, Jbeyq!Why it decodes itself
The alphabet has 26 letters, and 13 is exactly half of that. Rotating twice by 13 takes you all the way round, so applying ROT13 to encoded text gives back the original. One tool does both jobs.
The letter map
A to M map to N to Z, and N to Z map back to A to M:
- A-N, B-O, C-P, D-Q, E-R, F-S, G-T
- H-U, I-V, J-W, K-X, L-Y, M-Z
Rotate digits too
Tick Also rotate digits to apply ROT5 to the numbers 0 to 9, which shifts each digit by 5. Letters with ROT13 and digits with ROT5 together are sometimes called ROT18. Like ROT13, it undoes itself.
What ROT13 is used for
ROT13 hides text from a casual glance rather than from a determined reader. It is traditionally used for spoilers, puzzle answers, punchlines and geocaching hints, so that you only see the text if you choose to decode it.
It is not encryption
Anyone can reverse ROT13 in seconds. Never use it to protect passwords or private information.
To check whether some text is ROT13, use the ROT13 decoder. For many lines or a whole file, use the batch converter. The ROT13 guide covers the history and code examples.