ROT13 Cipher - Encode & Decode Text
Encode and decode text with ROT13 cipher online. Free ROT13 encoder/decoder - symmetric cipher, encoding and decoding are identical.
Three steps to get started
Enter your text
Type or paste the text you want to encode or decode with ROT13.
ROT13 is applied instantly
Each letter is shifted 13 positions. The result appears immediately below.
Copy the result
Click Copy - the same button encodes or decodes since ROT13 is self-inverse.
ROT13: the self-inverting cipher
ROT13 ("rotate by 13 places") is a monoalphabetic substitution cipher that replaces every letter with the one 13 positions later in the 26-letter Latin alphabet, wrapping past Z back to A. Formally, for a letter at zero-based indexi, the output index is (i + 13) mod 26. Because 13 is exactly half of 26, the transformation is its own inverse: applying it twice yields(i + 26) mod 26 = i, the original letter. That property is what makes ROT13 an involution, and why one button both encodes and decodes.
The mapping in full: A↔N, B↔O, C↔P, D↔Q, E↔R, F↔S, G↔T, H↔U, I↔V, J↔W, K↔X, L↔Y, M↔Z. Case is preserved and everything else - digits, spaces, punctuation, accented letters, emoji, CJK - passes through untouched. The classic demonstration isWhy did the chicken cross the road? → Jul qvq gur puvpxra pebff gur ebnq?. A well-known curiosity: PNG and ROT13 both encode to themselves' counterparts in amusing ways, and abjurer ROT13s tonowhere - one of only a handful of English word pairs that map onto each other.
Where ROT13 shows up:
- Usenet: the original use, hiding movie spoilers, punchlines, and offensive jokes so readers had to opt in; newsreaders like
rnandtrnshipped a one-key "R" decode - Puzzle hunts and geocaching: geocaching.com still ROT13s every listed hint by default
- Config obfuscation: historically abused to "hide" strings in software - Windows XP shipped a registry key with ROT13'd values, which is a well-cited cautionary tale, not a pattern to copy
- Teaching: the standard first example when introducing substitution ciphers and frequency analysis
Why ROT13 is not encryption
ROT13 has a key space of exactly one. There is no secret, so there is nothing to guess - anyone who recognizes the format can reverse it instantly, and letter-frequency analysis gives it away even to someone who does not. It is closer to an upside-down answer key in a puzzle book than to a cipher. The running joke among cryptographers is that applying it twice gives you "ROT26", i.e. no encryption at all, and that triple-ROT13 is marketed as being as strong as single. Never use it for passwords, tokens, personal data, or anything an adversary should not read - use AES-256-GCM or a vetted library for that.
ROT13 sits inside the broader Caesar cipher family, where the shift can be any value from 1 to 25; Julius Caesar reportedly used a shift of 3. Only the shift of 13 is self-inverse, which is precisely why it became the internet's default. Related variants extend the idea: ROT5 rotates digits, and ROT47rotates 94 printable ASCII characters, so punctuation is scrambled too. Everything here is computed in your browser with a simple character map - nothing is transmitted or logged.