Skip to content
S
Softween Tools
Back to Blog
encoders-decoders

ROT13 Encoder: The Simple Letter Substitution Cipher

Learn how ROT13 works, its history, use cases, and encode or decode text with our free ROT13 tool.

·Softween

ROT13 ("rotate by 13 places") is one of the simplest and most well-known letter substitution ciphers. It replaces each letter with the letter 13 positions after it in the alphabet.

How ROT13 Works

The English alphabet has 26 letters. Shifting by 13 means applying ROT13 twice returns the original text — the same function both encodes and decodes.

ROT13 Substitution Table

OriginalABCDEFGHIJKLM
ROT13NOPQRSTUVWXYZ
OriginalNOPQRSTUVWXYZ
ROT13ABCDEFGHIJKLM
Example: "HELLO" becomes "URYYB"

Key Properties

PropertyDescription
SymmetricEncoding = Decoding (apply twice = original)
Alphabet onlyNumbers and special characters are unchanged
Case preservingUppercase stays uppercase, lowercase stays lowercase
Not encryptionProvides no real security — it is trivially reversible

History and Use Cases

ROT13 originated in Usenet newsgroups in the 1980s. Common uses include:

  • Spoiler hiding: Concealing movie/book spoilers in online forums
  • Puzzle answers: Hiding answers while keeping them accessible
  • Email obfuscation: Basic email address hiding from simple scrapers
  • Learning: Teaching the basics of substitution ciphers
  • Easter eggs: Fun hidden messages in software and websites
  • ROT13 in Programming

    function rot13(str) {
      return str.replace(/[A-Za-z]/g, c =>
        String.fromCharCode(
          c.charCodeAt(0) + (c.toLowerCase() < 'n' ? 13 : -13)
        )
      );
    }
    

    ROT13 vs Other Ciphers

    ROT13 is part of the broader Caesar cipher family (shift ciphers). While ROT13 shifts by 13, a Caesar cipher can shift by any amount. None provide real security and should never be used for sensitive data.

    Try It Yourself

    Encode or decode ROT13 text instantly with our free ROT13 Encoder.

    Related Tools

    Command Palette

    Search for a command to run...