ROT13 Encoder / Decoder
Paste ROT13 to read it, or plain text to hide it. Encoding and decoding are the same step.
ROT13 is its own inverse — running it again on the output gives back the original, so there is nothing to choose.
- Plain text
- Why did the chicken cross the road?
- Encoded
- Jul qvq gur puvpxra pebff gur ebnq?
Other ciphers
How ROT13 works
ROT13 replaces every letter with the one thirteen places further along the alphabet, wrapping from Z back round to A: A becomes N, B becomes O, and N becomes A again. Thirteen is exactly half of twenty-six, so doing it twice lands every letter back where it started. That is why this page has no encode/decode switch — the same operation does both.
Only the letters A–Z change. Case is kept, and digits, spaces, punctuation, accented letters and emoji pass through untouched, so a ROT13 message keeps its shape: you can still see where the words and sentences break.
A worked example
Why did the chicken cross the road? becomes Jul qvq gur puvpxra pebff gur ebnq?. Run that through ROT13 again and the question comes back.
There is no key. Anyone who knows the message is ROT13 can read it, which is the point: it is a way of not reading something by accident, not a way of stopping someone who wants to.
What it was for, and how it is "broken"
ROT13 grew up on Usenet in the early 1980s, where it hid the punchline of a joke, a puzzle answer or a film spoiler from anyone scrolling past. You had to choose to decode it. That is still its honest use — spoilers, puzzle hints, answers at the bottom of a quiz.
It has no secrecy to break. A ROT13 text is recognisable on sight to anyone who has seen one, and undoing it needs no key and no guess: on a Unix shell it is tr 'A-Za-z' 'N-ZA-Mn-za-m'. If you need a message to stay private, use real encryption such as age.
Everything on this page runs in your browser — nothing you type is sent anywhere. The cipher encoder / decoder runs all five ciphers on one page, and the cipher buttons above switch this one too.
How do I decode ROT13?
Paste the text into the box above. ROT13 is its own inverse — encoding and decoding are the same step — so the output is the decoded message.
Is ROT13 the same as a Caesar cipher?
Yes: it is a Caesar cipher with the shift fixed at 13. What makes it special is that 13 is half the alphabet, so one function both hides and reveals.
Does ROT13 change numbers?
No. Only A–Z and a–z are rotated; digits and everything else pass through. "Why did the chicken cross the road?" keeps its spaces and question mark as "Jul qvq gur puvpxra pebff gur ebnq?". (ROT47 is a different scheme that also rotates digits and punctuation.)