Skip to content
ToolkitHub

ROT13 Encoder

ROT13 cipher encoder/decoder

Guide

ROT13: the cipher that undoes itself

By Logappradeep · ServiceNow developer

ROT13 ("rotate by 13 places") replaces each letter with the letter 13 positions after it in the alphabet, wrapping around from Z back to A. It is a special case of the Caesar cipher, which shifts letters by a fixed amount. Because the Latin alphabet has 26 letters, shifting by 13 twice brings every letter back to where it started, so the same operation both encodes and decodes.

How it works

The alphabet is effectively split into two halves that swap places:

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 becomes N, N becomes A, B becomes O, and so on. Case is preserved, so Hello, World! becomes Uryyb, Jbeyq!, and running ROT13 on that output returns the original. Digits, spaces, punctuation, accented letters, and non-Latin scripts are left unchanged.

Why anyone uses it

ROT13 was never meant to keep secrets. It became popular on Usenet in the 1980s as a polite way to hide spoilers, punchlines, and potentially offensive jokes: readers had to take a deliberate step to reveal the text, so nobody saw it by accident. The same idea survives today:

  • Spoilers and puzzle answers in forums, newsletters, and puzzle hunts.
  • Geocaching hints, which are traditionally ROT13-encoded so seekers can choose whether to read them.
  • Light obfuscation of text that should not be indexed or skimmed at a glance.
  • Programming exercises, since implementing ROT13 is a compact lesson in character codes and modular arithmetic.

Related variants

  • ROT5 rotates only the digits 0–9 by five places, and is sometimes combined with ROT13 as ROT18.
  • ROT47 rotates all printable ASCII characters from ! (33) to ~ (126), scrambling digits and punctuation as well.
  • General Caesar ciphers use any shift from 1 to 25, but only a shift of 13 is its own inverse.

What ROT13 is not

  • It is not encryption. There is no key, so anyone who knows the trick can reverse it immediately. Never use it to protect passwords, personal data, or anything sensitive.
  • It does not hide patterns. Word lengths, punctuation, and capitalization survive intact, so the structure of the message is still visible.
  • Applying it twice is not stronger. "Double ROT13" is a long-running joke precisely because it returns the original text.

The conversion happens instantly in your browser; your text is not sent anywhere.

Frequently asked questions

How do I decode ROT13?

Apply ROT13 again. Because 13 + 13 = 26, a second rotation returns every letter to its original position.

Is ROT13 secure?

No. It has no key and is trivially reversible, so it only hides text from casual glances. Use real encryption for anything sensitive.

Why are numbers not changed?

ROT13 only rotates the 26 Latin letters. ROT5 or ROT47 variants also rotate digits.

What happens to accented letters like é?

They are left as they are, because they are not part of the basic A–Z alphabet that ROT13 rotates.