How to use the ROT47 encoder and decoder
- Type or paste the text into Your text. The tool comes loaded with a sample line to show the effect.
- Read the Result underneath; it updates from what you entered.
- To decode, paste the scrambled text into the same box. There is no separate mode because ROT47 reverses itself.
What it does and when to use it
ROT47 is a fixed substitution over the 94 printable ASCII characters. Unlike ROT13, which only touches letters, it also hides digits and punctuation, so a phone number, a date or an email address is no longer readable at a glance. People use it to hide puzzle answers and spoilers, to keep a string from being picked up by simple text searches, and it turns up as one layer in capture-the-flag challenges.
It is obfuscation, not encryption: there is no key, and the method is public. For a cipher with a key, try the Vigenère cipher or the affine cipher, keeping in mind that classical ciphers are for puzzles and learning, not for protecting data. To see the character numbers ROT47 works with, use text to ASCII codes.
How it works
Each character with a code from 33 to 126 is replaced using:
new = 33 + ((code − 33 + 47) mod 94)
For P (80): 80 − 33 = 47, plus 47 is 94, and 94 mod 94 is 0, so the result is 33, the ! character. That is why Password starts with ! in the example below. Anything outside 33–126 is left untouched. The code runs in your browser, so nothing you paste is sent away.
Quick reference
These blocks shift as a group, which helps when decoding a few characters by hand:
A–K → p–z L–Z → { | } ~ ! " # $ % & ' ( ) * +
a–h → 2–9 i–o → : ; < = > ? @ p–z → A–K
0–9 → _ ` a b c d e f g h
Worked examples
Results from the tool’s own function:
Password: hunter2 → !2DDH@C5i 9F?E6Ca
user@example.com → FD6Co6I2>A=6]4@>
0123456789 → _`abcdefgh
In the first line the colon becomes i and the digit 2 becomes a, while the space stays a space. The second shows how an email address loses its familiar shape: @ becomes o and the dot becomes ]. The third shows that digits turn into an underscore, a backtick and the letters a to h.
Limits and tips
- Word lengths and line breaks survive, which gives away some structure.
- Text in other alphabets, and accented letters, stays readable. ROT47 is an ASCII-only trick.
- ROT47 output often contains backticks, asterisks and underscores. Paste it inside a code block in chat apps and forums so formatting does not eat characters.
Frequently asked questions
How can I tell that a string is ROT47?
Is there a decode button?
Can I use ROT47 to store a password?
Why are my line breaks and emoji unchanged?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.