Skip to content

ROT13,18,47 Encoding and Decoding

Encode/Decode text in ROT13,18 and 47

All three are their own inverse, so running the same one twice brings the text back.

What is ROT13, ROT18 or ROT47?

ROT13

  • Definition: ROT13 is a simple letter substitution cipher that replaces each letter with the letter 13 positions later in the alphabet. It wraps around such that after 'Z', it continues from 'A'.

  • How It Works:

    • For example:

      • A ↔ N

      • B ↔ O

      • C ↔ P

      • ...

      • M ↔ Z

  • Common Uses:

    • Often used in online forums to obscure spoilers or sensitive information.

    • Easy to implement and symmetric, meaning encoding and decoding are the same operation.

ROT18

  • Definition: ROT18 extends the concept of ROT13 by shifting letters by 18 positions in the alphabet and digits by 8 positions (0-9).

  • How It Works:

    • For letters:

      • A ↔ S

      • B ↔ T

      • ...

      • I ↔ W

    • For digits:

      • 0 ↔ 8

      • 1 ↔ 9

      • 2 ↔ 0

      • ...

  • Common Uses:

    • Less common than ROT13 but can be used to obscure text while providing a different level of obfuscation.

ROT47

  • Definition: ROT47 shifts printable ASCII characters (from 32 to 126) by 47 positions. This includes letters, digits, and various symbols.

  • How It Works:

    • For example, if you apply ROT47 to the character !, which has an ASCII value of 33, it shifts to ASCII value 80, resulting in the character P.

    • The rotation wraps around after reaching the maximum printable ASCII character.

  • Common Uses:

    • Used in some programming languages and applications to obscure text or code snippets.

    • Provides a way to encode all printable characters, making it more versatile than just shifting alphabetic characters.

Each of these rotation algorithms provides a different method of encoding text, with varying levels of complexity and application.