ROT13 Encoder and Decoder (Plus ROT5, ROT18, ROT47)

Rotate every letter 13 places. Run it again to get your text back.

Result

How it works

ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, shifting by 13 twice returns every letter to where it began. That means there is no separate decode step. Whatever you paste in, the same operation flips it.

It became popular in the early 1980s on Usenet discussion groups, as a way to hide joke punchlines, puzzle answers and spoilers. The point was never secrecy. It only stops you reading something by accident.

The variants

  • ROT5 rotates the digits 0 to 9 by five places and leaves letters alone.
  • ROT18 applies ROT13 to letters and ROT5 to digits together.
  • ROT47 rotates all 94 printable ASCII characters, from ! to ~, by 47 places. It scrambles digits and punctuation as well, so the result looks far less like words.

All four are their own reverse.

Worked example

Hello becomes Uryyb. Feed Uryyb back in and you get Hello.

ROT13 table

Each letter swaps with the one directly above or below it.

ABCDEFGHIJKLM
NOPQRSTUVWXYZ

Common questions

Is ROT13 encryption?

Only in name. It has no key, so anyone can undo it. Never use it to protect anything that matters.

Why 13?

It is exactly half of 26, which makes encoding and decoding the same step.

Related tools