About the ROT13 Encoder and Decoder
ROT13 shifts every letter 13 places along the alphabet, and because the alphabet has 26 letters, applying it twice returns the original text, so the same button encodes and decodes. Forums and newsgroups have long used it to hide spoilers, puzzle answers and punchlines from casual glances: Hello becomes Uryyb. This tool also offers ROT47, which rotates all printable ASCII characters including digits and symbols, and ROT18, which rotates letters and digits. None of these provide real security, since anyone can reverse them instantly, but they are perfect for keeping a surprise hidden until someone chooses to read it. For a stronger classical cipher, see the Vigenere Cipher, and for genuine protection, Encrypt Text Online.
In ROT13, A becomes N, B becomes O and M becomes Z, and the same mapping works backwards, with case preserved and everything else untouched. ROT5 rotates the digits 0 to 9 by five, so 1 becomes 6. ROT47 maps every character from ! (code 33) to ~ (code 126) to the one 47 places along, wrapping around, which scrambles numbers and symbols too. All three are self-inverse: paste the scrambled text and apply the same variant to read it.
Example: Hello becomes Uryyb in ROT13 and w6==@ in ROT47. The ROT18 of Room 101 is Ebbz 656.
ROT13 is not encryption: anyone can reverse it in a moment. For a cipher with a chosen shift use the Caesar cipher, for a keyword cipher the Vigenère cipher, and for real protection text encryption.
How to use the ROT13 Encoder and Decoder
- Paste the textPlain text to hide, or ROT text to reveal.
- Choose the variantROT13 for letters, ROT47 for all printable characters, ROT18 for letters and digits.
- Read the resultThe same operation encodes and decodes.
- Copy itShare spoilers and answers without giving them away.
ROT13 Encoder and Decoder features
- ROT13 letters only
- ROT47 for all printable ASCII
- ROT18 with digits
- Self-inverse: one click both ways
- Case preserved
- Other characters untouched
- Instant results
Common uses
- Hiding spoilers and punchlines
- Puzzle and quiz answers
- Geocaching hints
- Teaching simple ciphers
- Obscuring text from casual reading
ROT13 in practice: hiding quiz answers, geocaching hints, one-line command, forensics and classroom ideas
ROT13 is the polite way to hide something in plain sight: a quiz answer, a spoiler, a puzzle hint. Anyone can reveal it, but nobody sees it by accident. This guide hides a quiz answer, explains where ROT13 is still used every day, shows how to apply it with one command or one line of code, mentions its surprising role in Windows forensics and suggests classroom activities.
A worked example: hiding a quiz answer
A family WhatsApp group runs a weekly quiz. The question is posted with the answer encoded so nobody spots it early: The answer is Lahore becomes Gur nafjre vf Ynuber. When the time is up, anyone can paste the line into ROT13 and see the answer. Because ROT13 is its own reverse, the same operation hides and reveals the text.
Geocaching hints
Geocaching, the outdoor treasure-hunting game, uses ROT13 for cache hints on its listings, with a decrypt button for players who want help. Hints stay hidden for people who prefer to search unaided, yet are instantly available to anyone stuck. It remains one of the most visible everyday uses of the cipher.
One-line conversions
On Linux and macOS, the command tr 'A-Za-z' 'N-ZA-Mn-za-m' applies ROT13 to whatever passes through it, a classic example of the tr command. In Python, codecs.encode(text, 'rot13') does the same. These one-liners are handy for processing files of puzzle answers or test data.
A note from forensics
Windows records information about programs a user has opened in a registry area known as UserAssist, with program names stored in ROT13. Digital forensics investigators decode these names to build timelines. It is a reminder that ROT13 hides things only from casual eyes, never from anyone who looks deliberately.
Hiding email addresses
Some websites once encoded email addresses with ROT13 and decoded them with a script, hoping to hide them from spam harvesters. Modern harvesters easily handle such tricks. Contact forms protected against spam, or addresses shown as images with clear alternative contact methods, work better.
Why it is its own reverse
The English alphabet has 26 letters, and 13 is exactly half. Shifting by 13 twice adds up to 26, a full trip around the alphabet, so every letter returns home. No other shift has this property for English, which is why ROT13 needs no separate decode mode.
Classroom ideas
ROT13 is ideal for introducing symmetry and inverse operations. Students can predict what happens when ROT13 is applied twice, test it, then explain why. A follow-up asks whether ROT5 for digits behaves the same way and why ROT13 would not be self-reversing for an alphabet with an odd number of letters.
Spoilers in reviews and forums
Before forums offered spoiler tags, ROT13 let reviewers mention plot twists without ruining them for others. Many communities still use it for puzzle solutions and answers to riddles, because it works in plain text anywhere, including email, chat and comments.
Common mistakes
- Treating ROT13 as a way to protect private information.
- Expecting ROT13 to change numbers, which needs ROT5 or ROT18.
- Applying it twice and wondering why nothing changed.
- Using it on non-English text, which it leaves unchanged.
Related tools
For other shifts, use Caesar Cipher. For a reversed alphabet, try Atbash Cipher, and to flip text backwards, Text Reverser.
ROT13 in JavaScript
In JavaScript, a regular expression replacement can apply ROT13 in a single line by matching each letter and shifting its character code by 13 within its case range. It is a popular small exercise for learners, because it combines character codes, wrapping arithmetic and string replacement in a few characters of code.
What ROT13 leaves alone
ROT13 changes only the 26 English letters. Digits, punctuation and Urdu text pass through unchanged, so a hidden answer such as a year or an Urdu word remains visible. For numbers, ROT5 or ROT18 rotates the digits too, and for anything else a different method is needed.
The first layer of a puzzle
Puzzle hunts and online mystery games often use ROT13 as an easy first layer, giving newcomers a quick success before harder ciphers appear. Experienced solvers try it almost automatically on any jumble of English-looking letters, so it suits warm-up puzzles rather than final challenges.
Quiz etiquette
When using ROT13 to hide answers in a group chat, explain once how to decode it, perhaps with a link to a tool, and pin that message. Members who join later will otherwise see a strange message they cannot read, and the fun of the quiz depends on everyone being able to check answers.
A teaching example in programming
Programming tutorials use ROT13 as a simple transformation for practising text streams and functions; one well-known introductory course for the Go language includes a ROT13 reader exercise. Its self-reversing property also makes testing easy: applying it twice must return the original text.
Privacy
ROT13 runs in your browser. Your text is not uploaded or stored.
Frequently asked questions
How do I decode ROT13?
Apply ROT13 again. Each letter moves 13 places, and 13 + 13 = 26, a full circle, so the same operation restores the original. Paste the text and read the result.
What is ROT47?
A variant that rotates the 94 printable ASCII characters from ! to ~ by 47 places, so digits and punctuation are scrambled as well as letters. Like ROT13, it is its own inverse.
What is ROT18?
ROT13 for letters combined with ROT5 for digits, which rotates 0 to 9 by five places. It hides numbers as well, while leaving punctuation readable.
Is ROT13 encryption?
No. It has no key and anyone can undo it instantly. It is used to hide text from accidental reading, such as spoilers, not to protect secrets.
Why is it called ROT13?
Short for rotate by 13 places. It is a Caesar cipher with a shift of 13, chosen because 13 is half the alphabet, so encoding and decoding are the same.
Does ROT13 change numbers?
No, ROT13 only changes letters. Choose ROT18 to rotate digits too, or ROT47 to rotate digits and punctuation as well. ROT18 turns 5 into 0, and ROT47 turns ! into P. Both are their own inverse as well.
Where is ROT13 used?
On forums, Usenet and puzzle sites to hide spoilers, punchlines and answers, and in some software as trivial obfuscation; Windows, for example, stores its UserAssist registry entries in ROT13. It hides text from a casual glance, nothing more.
Does it work with other alphabets?
No. ROT13 is defined for the 26 letters of the English alphabet. Accented letters and other scripts are left unchanged. ROT47 covers all printable ASCII characters but still leaves accented letters, emoji and other scripts as they are.
Why is ROT13 its own inverse?
Because the English alphabet has 26 letters and 13 is exactly half of 26. Shifting a letter forward by 13 twice moves it 26 places, all the way round to where it started, so the same step encodes and decodes.