ROT13 / ROT47 Cipher

Encode or decode text with ROT13, ROT47 or a custom Caesar shift from 1 to 25, with results as you type and a copy button, right in your browser.

Runs in your browser. Files never leave your device.

About the ROT13 / ROT47 Cipher

Encode or decode text with the ROT13 cipher, the ROT47 cipher or a custom Caesar shift, and see the result as you type. ROT13 is the old forum trick for hiding spoilers and punchlines, and puzzle setters and geocachers still use it for hints. It also turns up in old code and config files.

ROT13 and ROT47 undo themselves: put the scrambled text through the same option and you get the original back. The conversion happens in your browser, so nothing you paste is sent anywhere.

How it works

ROT13 moves every letter 13 places along the 26-letter alphabet, wrapping from Z back to A. Upper and lower case stay as they were, and digits, spaces, punctuation and accented letters are left untouched. Because 13 + 13 = 26, applying ROT13 twice lands each letter back where it started, which is why the same button both encodes and decodes.

ROT47 works on a wider set: the 94 printable ASCII characters from ! (code 33) to ~ (code 126). Each one moves 47 places within that range, so letters, digits and most symbols all change. Spaces, line breaks and anything outside basic ASCII, such as é or emoji, pass through unchanged. 47 is half of 94, so ROT47 is also its own inverse.

Custom Shift is the general Caesar cipher: pick any shift from 1 to 25 with the slider and each letter moves that many places forward. Only A to Z and a to z are shifted, exactly as in ROT13.

ROT13 / Custom shift (letters only):
  new = (position + k) mod 26, with A = 0 … Z = 25, k = 13 for ROT13

ROT47 (printable ASCII, codes 33 to 126):
  new code = 33 + ((code − 33 + 47) mod 94)

To undo a custom shift of k, apply a shift of 26 − k. Text shifted by 3 comes back with a shift of 23.

Assumptions and limits

  • These ciphers hide text from a casual glance; they are not encryption. Anyone can reverse them in seconds, so never use them for passwords or private data.
  • ROT13 and Custom Shift change only the 52 unaccented English letters. Letters such as é, ü or ñ, and scripts like Arabic, Cyrillic or Chinese, stay as they are.
  • ROT47 changes digits and punctuation too, but leaves spaces and line breaks in place, so the word lengths of a sentence are still visible.
  • The custom slider runs from 1 to 25. A shift of 0 or 26 would return the text unchanged, and 13 gives the same output as ROT13.
  • There is no separate decode button: for ROT13 and ROT47, paste the scrambled text into the input and the output is the original.

Worked examples

Hide a joke's punchline with ROT13

Forum readers have long used ROT13 so a spoiler or answer isn't read by accident. Paste the line below and the scrambled version appears; paste that back in and the original returns. The 'ROT13' in the page's opening sample shows that digits are kept: it becomes EBG13.

Input:  Why did the chicken cross the road?
ROT13:  Jul qvq gur puvpxra pebff gur ebnq?

ROT47 scrambles numbers and symbols as well

ROT13 would leave a time and gate number readable. ROT47 changes them along with the letters, which makes it a better fit for puzzle clues that contain figures. Only the spaces stay put.

Input:  Meet me at 10:30 at gate 4B.
ROT13:  Zrrg zr ng 10:30 ng tngr 4O.
ROT47:  |66E >6 2E `_ib_ 2E 82E6 cq]

Decode a Caesar cipher with shift 3

The cipher Julius Caesar is said to have used shifts each letter by 3. Choose Custom Shift, set the slider to 3 and 'Attack at dawn' becomes 'Dwwdfn dw gdzq'. To read a message encoded with shift 3, set the slider to 23 instead.

Shift 3:   Attack at dawn  →  Dwwdfn dw gdzq
Shift 23:  Dwwdfn dw gdzq  →  Attack at dawn

ROT13 letter map

The map works both ways: a letter in either column turns into the letter beside it. Lower case follows the same pattern.

LetterROT13LetterROT13
ANNA
BOOB
CPPC
DQQD
ERRE
FSSF
GTTG
HUUH
IVVI
JWWJ
KXXK
LYYL
MZZM

How to use the ROT13 / ROT47 Cipher

  1. Pick a cipher. Choose ROT13 (Letters), ROT47 (ASCII) or Custom Shift at the top. For Custom Shift, drag the slider to the number of places you want.
  2. Type or paste your text. Put plain text or an already scrambled message in the Input Text box. The Cipher Output box updates on every keystroke.
  3. Copy the result. Press Copy above the output to put it on your clipboard, ready to paste into a post, message or puzzle sheet.

Frequently asked questions

How do I decode ROT13?

Paste the ROT13 text into the input with the ROT13 option selected, and the output is the original message. Shifting by 13 twice goes all the way around the alphabet, so encoding and decoding are the same step.

What is the difference between ROT13 and ROT47?

ROT13 rotates only the letters A to Z and leaves digits and punctuation readable. ROT47 rotates all 94 printable ASCII characters, so numbers and symbols such as @, # and ! change too. Both reverse themselves.

Is ROT13 the same as a Caesar cipher?

Yes, ROT13 is a Caesar cipher with a fixed shift of 13. The Custom Shift option lets you use any other shift from 1 to 25, and setting it to 13 gives exactly the same output as the ROT13 button.

Is ROT13 secure enough to protect a password?

No. There is no key to guess, only one possible shift, so anyone who sees the text can reverse it in a second with a tool like this one. Use it to hide spoilers or answers, and use real encryption or a password manager for anything private.

Why are some characters not changed?

Each option only shifts a fixed set of characters. ROT13 and Custom Shift touch only unaccented English letters, so digits, spaces and symbols stay. ROT47 covers printable ASCII but skips spaces, line breaks and characters beyond it, such as accented letters, currency signs like € and emoji.

How do I reverse a custom Caesar shift?

Subtract the shift from 26 and apply that. A message shifted by 5 is decoded with a shift of 21, and one shifted by 10 with 16. If you don't know the shift, try values on the slider until the output reads as words.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.