Skip to main content
ROT13 shifts every letter 13 positions: A becomes N, N becomes A. Because the alphabet has 26 letters, applying it twice restores the original, so one function both encodes and decodes. Digits, punctuation, and spacing are left untouched.

What it is actually for

ROT13 provides no security whatsoever and is trivially reversed by anyone. It was never meant to. Its real use is hiding text from casual reading: spoilers, puzzle answers, or the punchline of a joke on a forum.
ROT13 is not encryption. It has no key. Never use it to protect anything.

Implementing it

The related ROT47 rotates across a wider range of printable ASCII, so it scrambles punctuation and digits too. It is equally insecure.