ROT13 Decoder & Encoder
Spoilers, puzzle answers, and old forum posts often hide behind ROT13, a code most browsers cannot read natively. Manually shifting each letter by 13 positions is slow and easy to get wrong, especially in longer passages. Pasting text into an unfamiliar command-line tool feels like overkill for a quick spoiler check. Most readers just want the hidden message, not a lesson in cipher theory.
This ROT13 decoder and encoder reveals the hidden message the moment you paste in your text. A Mode dropdown also switches between ROT47, ROT5, ROT18, and a Custom Caesar shift for less common cases. Every conversion runs locally in your browser, so nothing you type is uploaded or stored. Use it to read spoilers, encode puzzle answers, or mask an email address in seconds.
ROT13 Conversion
Live conversion runs in your browser as you type.
ROT13 shifts letters by 13 places. It is self-inverse, so running it twice restores the original text.
What Is a ROT13 Decoder?
A ROT13 decoder reverses the ROT13 cipher, a substitution method that shifts every letter 13 places through the alphabet. Some people call the same tool a ROT13 translator, since it converts scrambled text back into a readable message. The letter A becomes N, B becomes O, and the pattern continues through the full 26-letter set. Numbers, punctuation, spaces, and symbols pass through unchanged, so only the letters are transformed.
A few small clues make ROT13 text easy to spot on sight. Its own name becomes "EBG13" when the cipher is applied to itself, a small trick often used to test decoders. The technique only works cleanly on the 26-letter Latin alphabet; other alphabets would need a different shift value to stay reversible.
ROT13 stands for "rotate by 13 places" and is sometimes written as ROT-13. It is a specific case of the older Caesar cipher, a technique Julius Caesar reportedly used over 2,000 years ago. Because 13 is exactly half of 26, running the same shift twice returns the original text.
How Does ROT13 Encoding Work?
Every letter has a position from 1 to 26, and ROT13 adds 13 to that position before wrapping back to the start. Mathematicians write this as C = (P + 13) mod 26, where P is the plain letter and C is the coded one. The "mod 26" part simply means the count loops back to A after reaching Z.
Case is preserved during the shift, so uppercase letters stay uppercase and lowercase letters stay lowercase. A capital "H" becomes "U", while a lowercase "h" becomes "u" under the same rule. This predictable, symmetric shift is exactly what makes ROT13 simple enough to compute by hand if needed.
How to Use This ROT13 Decoder and Encoder
Using this tool takes only a few seconds, and conversion happens live as you type. The Mode dropdown defaults to ROT13, so most people never need to change anything.
- Paste or type your text into the input box; the output updates instantly.
- Leave Mode set to ROT13, or switch it to ROT47, ROT5, ROT18, or Custom.
- For Custom mode, set a Shift from 1 to 25 and choose Encode or Decode.
- Copy the result with the copy button, or clear the fields to start over.
Interpreting the result is straightforward once you know what to expect. If your input was plain English and the output looks scrambled, the tool encoded it. If your input already looked scrambled and the output reads clearly, the tool just decoded a hidden message.
For Custom mode, the Encode/Decode toggle only appears when the shift isn't 13. A shift of 13 is self-inverse, just like standard ROT13, so no direction choice is needed.
ROT13 Decoder Examples
Most ROT13 tools show only one or two generic examples, which rarely match a real situation. The five examples below cover a word, a sentence, a spoiler, an email address, and a command-line case. Together they show how the same shift behaves across different kinds of text. These use the default ROT13 mode; ROT47, ROT5, ROT18, and Custom mode examples follow in the sections below.
Each example shows the plain text next to its ROT13 form, so you can check the pattern for yourself. Punctuation and spacing are left exactly where they were in the original text.
Example 1: A Single Word
The word "hello" becomes "uryyb" under ROT13, since each letter shifts 13 places forward. Running "uryyb" back through the same decoder restores "hello" exactly.
Example 2: A Full Sentence
The sentence "meet me at noon" converts to "zrrg zr ng abba" once every letter is shifted. Spaces stay in place, so the word boundaries remain easy to spot even in the coded version.
Example 3: A Forum Spoiler
A forum post reading "the butler did it" becomes "gur ohgyre qvq vg" once ROT13 is applied. Readers who want to avoid the spoiler simply skip the coded line, while curious readers paste it into the decoder.
Example 4: An Obscured Email Address
An address like "[email protected]" becomes "[email protected]" after conversion, since the letters shift but the symbols do not. This keeps the address readable to a human decoder while making it harder for simple bots to harvest.
Example 5: A Command-Line Message
The phrase "check the logs" turns into "purpx gur ybtf" through ROT13, matching what you would see from a Linux terminal command. Developers often generate this kind of output when testing scripts or leaving coded notes in shared files.
Decoding ROT13 in Linux and the Command Line
Developers frequently need to decode ROT13 without leaving a terminal session, especially when checking scripts or shared notes. The standard Linux tr command handles this in a single line without installing anything extra.
Running tr 'A-Za-z' 'N-ZA-Mn-za-m' pipes text through the same 13-letter shift this tool uses. For example, echo 'uryyb' {'|'} tr 'A-Za-z' 'N-ZA-Mn-za-m' prints "hello" back to the terminal. Because ROT13 is symmetric, the exact same command both encodes and decodes text.
This browser-based decoder is often faster for one-off conversions, since there is nothing to type or remember. Save the terminal method for scripts, automation, or situations where you are already working in a shell.
Custom Mode: ROT13 as a Caesar Cipher
ROT13 is a Caesar cipher with the shift amount locked to 13, rather than left open to any value from 1 to 25. A general Caesar cipher lets the sender choose the shift, which means the receiver must know that number to decode the message. This tool's Custom mode exposes that same choice through a Shift field.
Setting Custom mode's Shift to anything other than 13 reveals an Encode/Decode toggle, since the operation differs by direction. Choosing 13 hides the toggle automatically, because a 13-place shift is self-inverse just like standard ROT13. A Caesar cipher shifted by 7, for example, needs a shift of 19 to undo it, since 7 plus 19 equals 26.
Cipher | Shift Amount | Same Operation Encodes and Decodes? | Example |
|---|---|---|---|
| ROT13 | Fixed at 13 | Yes | `hello` -> `uryyb` |
| Caesar cipher (general) | Any value from 1 to 25, chosen by the sender | Only when the shift happens to be 13 | `hello` shifted by 3 -> `khoor` |
ROT47, ROT5, and ROT18 Modes
ROT47 extends the same idea to a wider set of 94 printable ASCII characters, so it also shifts digits, punctuation, and symbols. This makes ROT47 output look more scrambled than ROT13, since numbers and symbols change along with letters. Selecting ROT47 from the Mode dropdown switches this tool to that wider shift.
ROT5 applies the same rotation logic to digits only, shifting each number by 5 places within 0 through 9. ROT18 combines ROT13 and ROT5, shifting letters by 13 and digits by 5 in the same pass. Both are also available from the same Mode dropdown, alongside the default ROT13 setting.
Cipher | What It Shifts | Shift Amount | Self-Inverse? | Example |
|---|---|---|---|---|
| ROT13 | Letters (A-Z, a-z) | 13 | Yes | `hello` -> `uryyb` |
| ROT47 | All printable ASCII characters | 47 | Yes | `hi!` -> `9:P` |
| ROT5 | Digits (0-9) | 5 | Yes | `2024` -> `7579` |
| ROT18 | Letters and digits together | 13 for letters, 5 for digits | Yes | `room 42` -> `ebbz 97` |
Common Uses for ROT13
ROT13 was never meant to protect sensitive information. Its main job is hiding text from a casual glance rather than a determined reader. That property made it popular on Usenet newsgroups in the 1980s, well before modern forums existed.
Common situations where ROT13 shows up today include forums, puzzles, and small developer workflows. The list below covers the cases people run into most often.
- Hiding spoilers for movies, books, or games in forum posts and comments.
- Obscuring the answer to a puzzle or riddle until a reader wants to see it.
- Masking an email address on a public page to slow down basic spam bots.
- Leaving a coded joke or easter egg in code comments or documentation.
Developers often reach for ROT13 alongside other lightweight text tools rather than in isolation. A Base64 encoder/decoder handles a similar "obscure, not secure" conversion task. An HTML escape/unescape tool solves a related problem for special characters on a web page.
Is This ROT13 Decoder Secure?
ROT13 provides no real security and should never be used to protect passwords, financial details, or other sensitive data. Since the shift amount is fixed and publicly known, anyone can reverse it instantly with this tool or a single terminal command. Security researchers classify ROT13 as obfuscation, a way to hide text from a glance rather than from an attacker.
Brute-forcing ROT13 is not even necessary, since there is only one possible shift to try. This is very different from modern encryption like AES or RSA, which rely on a secret key that is hard to guess. If you need real protection instead, try an encryption/decryption tool. For passwords specifically, a hash generator is the right tool.
How This Tool Protects Your Privacy
Every conversion in this tool happens directly in your browser using JavaScript, without a round trip to any server. Your input text is never transmitted, logged, or stored anywhere, which matters even for a low-stakes cipher like this one. This client-side approach also means the tool keeps working even if your internet connection briefly drops.
Closing the tab clears the input and output instantly, since nothing was ever saved outside your current session. This is the same privacy-first approach used across the other converters and generators on this site. You can paste sensitive-looking text with confidence, even though ROT13 itself is not meant for genuine secrecy.
Frequently Asked Questions
Frequently Asked Questions