ROT13 shifts every letter 13 places through the alphabet. It is often used to hide a puzzle answer or spoiler from a casual glance. There is no key to choose: applying ROT13 again reveals the message.
One mapping for both directions
The alphabet has two halves of 13 letters. Move a letter 13 places to find its partner; move it another 13 and you are back where you started. That is why Encode and Decode give the same result for the same input.
| First half | Second half |
|---|---|
| ABCDEFGHIJKLM | NOPQRSTUVWXYZ |
Apply once
Abc Nop!Fixed shift 13; uppercase A–Z; preserve nonlettersNOP ABC!This tool first turns Abc Nop! into uppercase ABC NOP!. ROT13 gives NOP ABC!; applying it again returns ABC NOP!. The space and exclamation mark stay in place, but the original capitalization is not restored.
Follow a single letter
- Find B at index 1.
- Add 13 to get 14.
- Read index 14 as O.
- Repeat with O: 14 + 13 = 27, and 27 mod 26 = 1, returning B.
Try one yourself
Apply ROT13 to READ ME, then apply it to the result. Which punctuation or spacing changes?