ROT13 Encoder / Decoder
Encode or decode text using the ROT13 cipher. Apply it twice to get the original text back.
Paste text to apply the ROT13 Caesar cipher, each letter is shifted 13 places. Applying ROT13 twice returns the original text. Commonly used for spoilers and puzzle answers.
ROT13 only changes English letters A to Z. Numbers, punctuation, spaces, emoji, and non-Latin characters pass through unchanged.
Input
ROT13 Output
How it works: Each letter is shifted 13 positions in the alphabet. Since there are 26 letters, applying ROT13 twice returns the original text. Numbers and special characters are unchanged.
Good to know before using ROT13
ROT13 is reversible text obfuscation. It is useful when the reader is allowed to reveal the message, not when the message needs protection.
Encode and decode are identical
Paste ROT13 output back into the tool and you get the original text.
Case is preserved
Hello becomes Uryyb, keeping the capital H pattern.
It is not encryption
Anyone can reverse ROT13 by applying the same shift again. Do not use it for secrets.
Non-letters stay visible
Dates, numbers, punctuation, and URLs remain readable, which can be useful or revealing.
English alphabet only
Accented letters such as é and non-Latin scripts are left as they are.
Useful for reversible hints
ROT13 works well for puzzle nudges and spoilers where the reader can choose to reveal the text.
URLs stay mostly readable
The punctuation in https:// remains, so ROT13 is a poor fit for hiding links.
Short text may be obvious
Words such as "uryyb" are recognisable ROT13 patterns to many puzzle solvers.
Apply twice to test
A quick sanity check is to paste the output back in and confirm the original text returns.
For anything sensitive, use real encryption with keys instead of a reversible alphabet shift.
ROT13: The Simplest Cipher
ROT13 is a letter substitution cipher that replaces each letter with the one 13 positions later in the alphabet. A becomes N, B becomes O, C becomes P, and so on. Since the English alphabet has 26 letters, applying ROT13 twice gives you back the original text, it's its own inverse.
ROT13 isn't encryption, it provides zero security against anyone who knows what it is (which is everyone). It's a spoiler tag for text. Usenet newsgroups used it in the 1980s and 90s to hide punchlines, puzzle solutions, and movie spoilers. Today you'll still see it used in forums, CTF challenges, and as the canonical example of a Caesar cipher in computer science courses.
The beauty of ROT13 is its symmetry: encode and decode are the same operation. Paste encoded text, get the original. Paste plain text, get the encoded version. The same button does both.
ROT13 Alphabet Mapping
| Original | A-M | N-Z |
|---|---|---|
| Input | A B C D E F G H I J K L M | N O P Q R S T U V W X Y Z |
| Output | N O P Q R S T U V W X Y Z | A B C D E F G H I J K L M |
What this means for you: Each letter swaps with its partner 13 positions away. A↔N, B↔O, C↔P... The mapping is perfectly symmetrical, which is why encoding equals decoding. Numbers, spaces, and punctuation are unchanged.
Caesar Ciphers and ROT Variants
| Cipher | Shift | "HELLO" Becomes | Used For |
|---|---|---|---|
| ROT1 | 1 | IFMMP | Educational examples |
| ROT3 | 3 | KHOOR | Original Caesar cipher |
| ROT5 | 5 (digits only) | N/A (affects 0-9) | Obscuring phone numbers |
| ROT13 | 13 | URYYB | Text spoiler hiding (self-inverse) |
| ROT47 | 47 (ASCII 33-126) | w6{{~ | Obscuring all printable ASCII |
What this means for you: ROT13 is special because 13 is exactly half of 26 (the alphabet size), making it self-inverse. No other ROT value has this property for the English alphabet. ROT47 extends the concept to all printable ASCII characters.
Where You'll Encounter ROT13
CTF challenges
Capture The Flag competitions frequently use ROT13 as a warm-up challenge or as one layer in a multi-step decoding puzzle. If you see text that looks like garbled English, try ROT13 first, it's the most common simple encoding in CTFs.
Forum spoiler tags
Before HTML spoiler tags existed, Usenet and early forums used ROT13 to hide spoilers. You had to deliberately decode the text to read it. The convention persists in some communities and mailing lists.
Programming interviews
Implementing ROT13 is a classic interview question that tests string manipulation, character codes, and modular arithmetic. The one-liner version in most languages is surprisingly elegant.
Email address obfuscation
Some websites encode email addresses with ROT13 in HTML to deter simple spam bots, then decode them with JavaScript when displayed. It only blocks the simplest copy-paste scraping, and modern bots can still read it.
ROT13 One-Liners by Language
| Language | Implementation |
|---|---|
| JavaScript | s.replace(/[a-z]/gi, c => String.fromCharCode(c.charCodeAt(0) + (c.toLowerCase() < 'n' ? 13 : -13))) |
| Python | import codecs; codecs.encode(s, 'rot_13') |
| Bash | echo "text" | tr 'A-Za-z' 'N-ZA-Mn-za-m' |
| Ruby | s.tr('A-Za-z', 'N-ZA-Mn-za-m') |
| PHP | str_rot13($s) |
Python and PHP have built-in ROT13 functions, that's how common it is. The Bash tr approach is the classic Unix way and works in any terminal.
Worked ROT13 Example
A puzzle setter might hide a hint with ROT13 so the reader can choose whether to reveal it:
Plain text
Check the left door first.
ROT13 text
Purpx gur yrsg qbbe svefg.
Paste the ROT13 text back into the encoder and it returns the original sentence. The full stop and spaces are unchanged.
Common ROT13 Mistakes
Calling it secure
ROT13 is intentionally easy to reverse. It hides casual spoilers, not private information.
Expecting punctuation to change
Only letters A to Z are shifted. Numbers, punctuation, whitespace, and symbols stay in place.
Forgetting that case is preserved
Uppercase input stays uppercase after the shift, and lowercase input stays lowercase.
Using it for non-English alphabets
ROT13 is defined around the 26-letter English alphabet. Other scripts need different rules.
Related Tools
How to use this tool
Paste or type text in the input panel
The ROT13 output appears instantly in the right panel
Paste ROT13 text to decode it, encoding and decoding are the same
Common uses
- Hiding spoilers in text-based forums and messages
- Solving CTF and puzzle challenges
- Learning about substitution ciphers in CS courses
- Obfuscating text in a reversible, recognisable way
Share this tool
Frequently Asked Questions
What is ROT13?
Is ROT13 secure?
Is my text sent to a server?
Why is ROT13 special among Caesar ciphers?
What happens to numbers and punctuation?
Where is ROT13 actually used?
What's a Caesar cipher?
Can I decode text I didn't encode?
How is ROT13 implemented in code?
What's ROT47?
Is ROT13 case-sensitive?
Why do I see ROT13 in CTF competitions?
Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.