Encoders / DecodersLesson 19Free preview
ROT13 / ROT47 Cipher
This lesson is part of Web Developer Tools · All levels
Summary
ROT13 is a substitution cipher that shifts each letter by 13 positions in the alphabet, so that a becomes n and vice versa. Since the Latin alphabet has 26 letters, applying ROT13 twice restores the text to its original form. ROT47 is similar, but shifts the entire printable ASCII character (codes 33 to 126) by 47 positions. Both are just to disguise the text, not for real security.
Key points
- ROT13 shifts the letter 13 position and is self-inverse
- The numbers and punctuation remain unchanged on ROT13
- ROT47 works on ASCII characters 33-126, including symbols
- Apply the same cipher twice to restore the original text
- ROT13 and ROT47 are not secure encryption.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.