ROT13 replaces each letter with the letter 13 positions later in the alphabet, wrapping around from Z to A. Because the alphabet has 26 letters, running ROT13 twice returns the original text, so one tool both encodes and decodes.
Example
Gur dhvpx oebja sbk whzcf bire gur ynml qbt.The quick brown fox jumps over the lazy dog.With Mode: ROT47, w6==@ (@C=5P decodes to Hello World!.
ROT13 and ROT47
ROT13 is a Caesar cipher with a fixed shift of 13. It only changes A–Z and a–z and keeps their case. Digits, spaces and punctuation are untouched, so word lengths stay visible. It was popular on Usenet for hiding spoilers and punchlines, and it still appears in puzzle hints, geocaching, forum spoilers and the occasional "obfuscated" config value.
| Plain | A B C D E F G H I J K L M |
|---|---|
| ROT13 | N O P Q R S T U V W X Y Z |
ROT47 rotates every printable ASCII character from ! (33) to ~ (126) by 47 positions, so digits and punctuation change too. That makes the result look less like words. It is also self-inverse, because there are 94 printable characters and 47 is half of 94.
Neither is encryption. There's no key, and anyone can reverse them instantly.
How to use the ROT13 decoder
- Paste the text.
- Choose ROT13 for letters only, or ROT47 if digits and symbols are scrambled too.
- Read the result. To encode, paste plain text; the operation is the same.
ROT13 in code
import codecs
print(codecs.encode("Gur dhvpx oebja sbk", "rot13")) # The quick brown foxconst rot13 = (s) =>
s.replace(/[a-z]/gi, (c) => {
const base = c <= "Z" ? 65 : 97;
return String.fromCharCode(((c.charCodeAt(0) - base + 13) % 26) + base);
});
console.log(rot13("Gur dhvpx oebja sbk")); // The quick brown foxecho 'Gur dhvpx oebja sbk' | tr 'A-Za-z' 'N-ZA-Mn-za-m'At a glance
| ROT13 | Letters shifted by 13. Self-inverse |
| ROT47 | ASCII 33–126 shifted by 47. Self-inverse |
| Key | None |
| Security | None. It hides text from a casual glance only |
Frequently asked questions
How do I know if text is ROT13?
Word lengths and punctuation look normal, but the words are nonsense with familiar shapes: gur (the), naq (and), vf (is). If ROT13 doesn't work, try every shift with the Caesar cipher decoder.
What is ROT18?
An informal name for ROT13 on letters combined with ROT5 on digits. This tool doesn't have a ROT18 mode. Use ROT47 if digits are scrambled too, or decode the letters here and shift digits by 5 by hand.
Is ROT13 the same as a Caesar cipher?
Yes, it's the Caesar cipher with a shift of 13. It's the only shift that is its own inverse for the 26-letter alphabet.
Last reviewed · found a mistake? contact@decoder.tools · view as markdown