🔁 ROT13 Encoder and Decoder
By ToolNimba Text Team · Updated 2026-06-19
Start typing to see the ROT13 result.
ROT13 (rotate by 13) is a simple letter substitution that shifts each letter of the alphabet forward by 13 positions, so A becomes N, B becomes O, and so on. Because the alphabet has 26 letters, shifting by 13 twice lands you back where you started, which means the very same operation both scrambles and unscrambles text. Paste anything into the box and the ROT13 version appears instantly, ready to copy. It runs entirely in your browser, so nothing you type is uploaded or stored anywhere.
What is the ROT13 Encoder?
ROT13 is a special case of the Caesar cipher, the classic method that shifts every letter by a fixed amount. The Caesar cipher can use any shift from 1 to 25, but ROT13 always uses 13. That single choice gives ROT13 its defining trick: since 13 is exactly half of 26, applying the shift a second time adds up to a full 26-letter rotation and returns the original text. Encoding and decoding are therefore the identical operation, so there is no separate decode button to press and no key to remember.
The transform touches only the 26 basic Latin letters. Uppercase letters map to uppercase, lowercase to lowercase, and everything else (digits, spaces, punctuation, line breaks, accented characters and emoji) passes through unchanged. That is why ROT13 of a sentence keeps the same word lengths, spacing and punctuation, it just garbles the readable letters. This preservation of layout is part of what makes ROT13 recognisable on sight to people familiar with it.
ROT13 is not encryption in any meaningful sense, it offers no security because anyone can reverse it in seconds with no key. Its real purpose is to lightly obscure text so a reader has to opt in to see it: hiding spoilers, punchlines, puzzle answers or offensive jokes in online forums, scrambling email addresses to slow down basic scrapers, and serving as a friendly teaching example for how substitution ciphers work. Treat it as a reversible veil, never as a way to protect anything sensitive.
When to use it
- Hiding spoilers, plot twists or puzzle answers in a forum post or chat so readers reveal them only on purpose.
- Concealing the punchline of a joke or a riddle solution until someone decodes it.
- Lightly obscuring an email address or short note to slow down casual scraping or shoulder-surfing.
- Teaching or learning how the Caesar cipher and letter-substitution ciphers work, with a self-reversing example.
- Quickly decoding ROT13 text you found online without installing anything.
How to use the ROT13 Encoder
- Type or paste your text into the input box.
- Read the ROT13 version in the result box as it updates live.
- Press Copy to put the result on your clipboard.
- To decode ROT13 text, paste it in the same way, the result box shows the original because ROT13 reverses itself.
Formula & method
Worked examples
Encode the word "Hello" with ROT13.
- H is letter 7 (A = 0). (7 + 13) mod 26 = 20, which is U.
- e is letter 4. (4 + 13) mod 26 = 17, which is r.
- l is letter 11. (11 + 13) mod 26 = 24, which is y.
- The second l also becomes y.
- o is letter 14. (14 + 13) mod 26 = 27, and 27 mod 26 = 1, which is b.
- Putting the letters together gives Uryyb.
Result: Hello becomes Uryyb (and running ROT13 on Uryyb returns Hello).
Encode the mixed string "ROT13!" to see how digits and punctuation are treated.
- R is letter 17. (17 + 13) mod 26 = 30, and 30 mod 26 = 4, which is E.
- O is letter 14. (14 + 13) mod 26 = 27, and 27 mod 26 = 1, which is B.
- T is letter 19. (19 + 13) mod 26 = 32, and 32 mod 26 = 6, which is G.
- The characters 1, 3 and the exclamation mark are not letters, so they stay exactly as they are.
- Joining the result gives EBG13!.
Result: ROT13! becomes EBG13!, showing that only the letters rotate.
ROT13 mapping for the full alphabet (each letter and what it becomes)
| Original | Becomes | Original | Becomes |
|---|---|---|---|
| A | N | N | A |
| B | O | O | B |
| C | P | P | C |
| D | Q | Q | D |
| E | R | R | E |
| F | S | S | F |
| G | T | T | G |
| H | U | U | H |
| I | V | V | I |
| J | W | W | J |
| K | X | X | K |
| L | Y | Y | L |
| M | Z | Z | M |
Common mistakes to avoid
- Treating ROT13 as secure encryption. ROT13 uses a fixed, publicly known shift and no secret key, so anyone can reverse it instantly. Never use it to protect passwords, personal data or anything that actually needs to stay private.
- Looking for a separate decode button. There is no decode mode. Because 13 is half of 26, applying ROT13 to ROT13 text gives back the original. Just paste the scrambled text into the same box and read the result.
- Expecting numbers to change. ROT13 only rotates the 26 Latin letters. Digits stay as digits. If you need numbers shifted too, that is a different scheme (sometimes called ROT18 or ROT47), not plain ROT13.
- Forgetting it preserves spacing and punctuation. Word lengths, spaces and punctuation are untouched, which can leak structure. ROT13 hides which letters you used, not how long your words are or where the breaks fall.
Glossary
- ROT13
- A letter substitution that rotates each Latin letter by 13 positions; applying it twice restores the original.
- Caesar cipher
- A substitution cipher that shifts every letter by a fixed number of positions. ROT13 is the Caesar cipher with a shift of 13.
- Substitution cipher
- Any method that replaces each character with another according to a fixed rule.
- Self-inverse
- An operation that undoes itself when applied a second time, as ROT13 does on text.
- Modulo (mod)
- The remainder after division, used here to wrap letter positions around the 26-letter alphabet.
Frequently asked questions
What is ROT13?
ROT13 (short for rotate by 13) is a simple cipher that replaces each letter with the one 13 places further along the alphabet, wrapping from Z back to A. It is a Caesar cipher with a fixed shift of 13, commonly used online to hide spoilers and joke punchlines.
How do I decode ROT13?
You decode ROT13 exactly the same way you encode it. Because 13 is half of 26 letters, applying ROT13 twice returns the original text. Paste the scrambled text into the box and the result box shows the readable version, no key or separate mode needed.
Is ROT13 secure?
No. ROT13 offers no real security because it has no secret key and the shift is publicly known, so anyone can reverse it in seconds. It is meant to lightly obscure text, for example to hide spoilers, not to protect sensitive information.
Does ROT13 change numbers and punctuation?
No. ROT13 only rotates the 26 Latin letters. Digits, spaces, punctuation, accented characters and emoji pass through unchanged, which is why the result keeps the same word lengths and layout as your input.
Why use a shift of exactly 13?
Because the alphabet has 26 letters and 13 is exactly half of that, one shift of 13 forward equals one shift of 13 backward. This makes encoding and decoding the identical operation, so a single function handles both directions.
Is my text sent anywhere?
No. The whole transform runs in your browser with plain JavaScript. Nothing you type is uploaded, logged or stored, so you can use it offline and with text you would rather not share.