ROT13 Encoder and Decoder

Rotate text with ROT13 and the same step both encodes and decodes it. Pick a Variant for ROT5 digits, ROT18 or ROT47 when you need more than letters. The tool is free and runs privately in your browser.

ROT13 Encoder and DecoderPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Result

Example: Hello → Uryyb

How to use the ROT13 tool

Every variant undoes itself, so there is no separate decode switch.

  1. Type or paste your text into the Input box.
  2. Choose a Variant: ROT13 (letters) is the default, ROT5 (digits), ROT18 (letters + digits) and ROT47 (all printable ASCII) are the others.
  3. Read the rotated text in the output box. It updates as you type.
  4. To decode, paste the rotated text back in with the same variant, or press Use as input to send the output back round.
  5. Press Copy or Download .txt when you are done.

The rotation runs in your browser, and nothing is uploaded. Characters a variant does not cover are left as they were, and line breaks and spacing are untouched, so a rotated paragraph keeps its layout and can be pasted straight back into a forum post or document.

How each variant rotates

ROT13 moves each letter 13 places along the alphabet and wraps from Z to A, keeping case. The alphabet has 26 letters, so doing it twice returns the start. ROT5 does the same for digits, adding five to each, so 0 swaps with 5 and 1 with 6. ROT18 is ROT13 for letters and ROT5 for digits together. ROT47 works on the 94 printable ASCII characters from ! (code 33) to ~ (code 126), adding 47 and wrapping, which also changes punctuation and digits. Spaces are never touched, and letters outside plain English, such as é, pass through unchanged.

VariantInput Hello 123! becomes
ROT13Uryyb 123!
ROT5Hello 678!
ROT18Uryyb 678!
ROT47w6==@ `abP

What ROT13 is for, and what it is not

ROT13 became a habit on Usenet in the 1980s as a courtesy: spoilers, joke punchlines and puzzle answers were rotated so that nobody read them by accident, and anyone who wanted to could reverse it in a second. Geocaching hint text still follows that convention, and some text editors and mail programs include a ROT13 command for the same reason. It is not security. There is no key, and every rotation is public knowledge, so never use it for passwords or private data.

Worked example: The butler did it becomes Gur ohgyre qvq vg. Letters pair up neatly, A with N, B with O, and so on to M with Z, which is why the same pass reverses itself.

ROT13 is a Caesar cipher with the shift fixed at 13, so the Caesar cipher tool can reproduce it and also try other shifts. If you want text that looks different instead of scrambled, the upside down text generator and the reverse text generator change its appearance while staying readable by eye.

Common slips

  • Nothing seems to change. Rotating twice returns the original. If the output matches your input, you may have fed it the result of an earlier pass.
  • Digits stayed the same. ROT13 only touches letters. Choose ROT18 to rotate digits as well, or ROT5 for digits alone.
  • Combining passes. ROT13 followed by ROT5 gives the same result as ROT18 in one go, because letters and digits are separate sets, but this does not hold for ROT47, which touches both.
  • Mixed variants. Text rotated with ROT47 must be reversed with ROT47. Using ROT13 on it gives a different mess.
  • Awkward characters. ROT47 output can contain quotes, backticks and backslashes, which may need escaping if you paste it into code or Markdown.
  • Letters with accents. Only plain A to Z letters rotate. A word such as café becomes pnsé under ROT13, so the accented letter stays visible and gives a clue.

It also helps to know what the tool does not do. There is no way to choose a different number of places; for that, use a Caesar shift. There is no file input, and nothing is stored between visits, so copy any result you want to keep before closing the page.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How do I decode ROT13?

Paste the rotated text into the Input box with the Variant set to ROT13. ROT13 is its own inverse, so applying it to encoded text returns the original. There is no separate decode mode, because rotating 13 places twice equals rotating 26.

Is ROT13 encryption?

Technically it is a substitution cipher, but it offers no security. There is no key, and anyone can reverse it instantly. ROT13 hides text from accidental reading, such as spoilers, not from a determined reader. Never use it for passwords or private data.

What is the difference between ROT13 and ROT47?

ROT13 rotates only the 26 letters and leaves digits and punctuation alone. ROT47 rotates all 94 printable ASCII characters, from the exclamation mark to the tilde, by 47 places, so numbers and symbols change too. Both undo themselves when applied twice.

Does ROT13 work on numbers?

Not by itself. Standard ROT13 touches only letters. To rotate digits choose ROT5, which adds five to each digit, so 1 becomes 6, or ROT18, which does letters and digits together. ROT47 also changes digits and punctuation.

Why is ROT13 used for spoilers?

It is a courtesy. The text is unreadable at a glance, so people who do not want the spoiler are not exposed to it, while anyone who does can decode it in seconds. The convention began on Usenet newsgroups in the 1980s and survives on forums.