StringMash.com

ROT13 decoder and encoder

Rotate every letter by 13. Paste a message with an unknown shift and we will find it for you.

Conversion

ROT13 undoes itself, so there is nothing to swap: the same button encodes and decodes.

11 characters
Updates as you type
Shift 13

Don't know the shift? We tried them all

Every shift from 1 to 25, ranked by how much the result looks like English. Pick one to use it.

  1. Shift 13HELLO WORLDLikely English
  2. Shift 24WTAAD LDGAS
  3. Shift 10KHOOR ZRUOG
  4. Shift 20AXEEH PHKEW
  5. Shift 23XUBBE MEHBT

Using the ROT13 converter

Paste on the left and read the result on the right. The same step encodes and decodes, so the swap button is switched off. There's nothing for it to do.

Shift moves the letters by any amount from 1 to 25, which turns this into a general Caesar cipher, and Auto-detect works the shift out from the text. Numbers decides whether digits sit still or rotate by five, a convention puzzle setters call ROT5. Below the tool you'll find all 25 shifts ranked, so you can read the answer off even when the shift is a mystery.

How the rotation works

ROT13 replaces each letter with the one 13 places further on, wrapping from Z round to A. Thirteen is half of 26, so doing it twice lands you back where you started. One operation, no key, no separate decoder.

It isn't protection and was never sold as any. Recognise the method and you've broken it, and the cipher identifier recognises it in about a millisecond.

A–Z

ROT13 letter table

AN
BO
CP
DQ
ER
FS
GT
HU
IV
JW
KX
LY
MZ
NA
OB
PC
QD
RE
SF
TG
UH
VI
WJ
XK
YL
ZM

A convention, not a cipher

ROT13 grew up on Usenet in the early 1980s as the polite way to post a spoiler or a punchline. The text stayed visible but stopped being readable by accident, and every newsreader had a key that flipped it back. The problem it solved was social, not cryptographic.

It has also turned up where something stronger was wanted. Windows XP stored its record of the programs you'd run in a registry key obfuscated with ROT13, apparently to deter a casual snoop. It deterred nobody: the trick was spotted and documented, and the key has been readable ever since.

Related conversions

Atbash is the other fixed substitution here, mirroring the alphabet rather than rotating it, and it undoes itself the same way.

Not letters at all? Base64 and binary are what unreadable usually turns out to be, and the cipher identifier checks both alongside the shifts.

Questions

Is ROT13 secure?

No. It hides spoilers and puzzle answers from a quick glance, and anyone can reverse it instantly.

What's the difference between ROT13 and a Caesar cipher?

ROT13 is a Caesar cipher with the shift fixed at 13. Change the shift above and you have the general case.

How does auto-detect work?

It tries all 25 shifts and scores each result on how often common English letters, letter pairs and words turn up. On anything longer than a few words it's reliable.

Why does ROT13 undo itself?

Because 13 is half of 26. Rotate twice and every letter has gone a full lap.