ROT13 Encoder / Decoder

Encode and decode ROT13 — letter substitution shifting each letter 13 positions. Classic Usenet text obfuscation.

ROT13 Output

What is ROT13?

ROT13 ('rotate by 13 places') is a simple letter substitution cipher where each letter is replaced with the letter 13 positions later in the alphabet. Since the English alphabet has 26 letters, applying ROT13 twice returns the original text — the same operation both encodes AND decodes. Originating on Usenet (early internet bulletin boards) in the 1980s, ROT13 became the standard way to share spoilers, jokes, offensive material, and puzzle solutions without immediate visibility. It's NOT real encryption — anyone with the key (which is public knowledge) can decode instantly. Use for: hiding movie/book spoilers in forum posts, light obfuscation of joke punchlines, programming exercises, simple puzzles, historical interest.

How to use this tool

  1. Type your text — Any English text. Only letters convert; numbers and symbols unchanged.
  2. View ROT13 result — Output updates as you type.
  3. Copy result — Use in forum posts, spoiler tags, light puzzles.
  4. Decode by applying again — Paste ROT13 text back in — output returns original. Same operation both ways.

ROT13 mapping

A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z

A → N, B → O, C → P, ... M → Z
N → A, O → B, P → C, ... Z → M

Algorithm:

  1. For each letter, compute (charCode - baseCode + 13) % 26
  2. baseCode = 65 for uppercase ('A'), 97 for lowercase ('a')
  3. Add baseCode back to get final character
  4. Non-letters pass through unchanged

Because 13 + 13 = 26 (full alphabet rotation = no change), applying ROT13 twice gives original text. This involution property is why one tool handles both encoding and decoding.

Examples

  • 'Hello': → 'Uryyb'
  • 'ROT13': → 'EBG13' (numbers unchanged)
  • 'The answer is 42': → 'Gur nafjre vf 42'
  • Forum spoiler: 'Gur ovt onq jbys jrgf ynvq' = 'The big bad wolf gets laid' (decode to read)
  • Joke punchline: 'Vg jnf gur ohgyre!' = 'It was the butler!'
  • Programming exercise: Implement ROT13 in your favorite language — classic string manipulation practice

Tips & best practices

  • ROT13 is NOT secure — anyone can decode in seconds. Use for casual obfuscation only
  • Pairs with spoiler warnings: '[SPOILER ROT13]: Gur urb qvrf' so users choose to decode
  • Many Usenet/Reddit clients have built-in ROT13 toggles
  • Don't use for sensitive info, passwords, or anything requiring real privacy
  • For real encryption, use AES, ChaCha20, or RSA — not ROT13
  • Useful as programming exercise: clean implementation tests string handling skills
  • ROT13 is a special case of Caesar cipher with shift = 13

Limitations & notes

Zero security — ROT13 is well-known and trivially decoded. Modern uses are purely cultural (Usenet tradition) or educational (programming exercises). Doesn't handle non-ASCII letters (accented characters, Greek, Cyrillic) — only English A-Z.

Frequently Asked Questions

Is ROT13 secure?

No — trivially decoded by anyone. It's obfuscation, not encryption. For real security use AES or similar.

Why use ROT13 if it's not secure?

Spoiler hiding (forum posts), joke punchlines (reveal effort required), casual fun. Original purpose: hide profanity/spoilers in plain text without it being immediately visible while scrolling.

How is ROT13 different from Caesar cipher?

ROT13 IS a Caesar cipher with shift = 13. The general Caesar cipher allows any shift 1-25. ROT13 is special because shift 13 is exactly half the alphabet, making encode = decode.

Does ROT13 work for non-English text?

Only for English A-Z letters. Numbers, punctuation, spaces, accented letters, non-Latin scripts all pass through unchanged. For Spanish ñ, Russian, Chinese, etc. — ROT13 doesn't apply.

Can I use ROT13 for passwords?

Don't — passwords need real encryption. ROT13 provides no protection. Use bcrypt or Argon2 for password storage.

Is ROT13 used anywhere serious today?

No — only nostalgic Usenet uses, spoiler protection, and education. Real cryptography moved past simple substitution centuries ago.

What about ROT47?

ROT47 is a variant operating on printable ASCII characters (33-126 in ASCII table), rotating by 47. Includes numbers and symbols. Slightly more obscure than ROT13 but equally insecure.

Related tools

Caesar Cipher · Atbash Cipher · Base64 Encoder & Decoder

Copied