What Is ROT47?
ROT47 is a character-rotation cipher that scrambles the entire printable ASCII set. Where the
classic ROT13 shifts only the 26 letters, ROT47 rotates every printable character — uppercase and
lowercase letters, digits, punctuation, and symbols — by 47 positions within the 94-character range
that runs from ! (code 33) to ~ (code 126). The result is a message that
looks like complete gibberish, with no recognizable words, numbers, or punctuation left in place.
ROT47 belongs to the informal ROT family that grew up in early internet culture. ROT13 was the classic way to hide jokes and spoilers on USENET; ROT47 extends the same idea so that digits and symbols get scrambled too. It has no official standard — it is a folk convention, and that informality is part of its charm: a single documented rule, trivially reversible, with no key to manage.
How ROT47 Works
Think of the 94 printable ASCII characters arranged in a circle, from ! at position 0
up to ~ at position 93. ROT47 replaces each character with the one 47 steps later on
that circle, wrapping from ~ back to !:
| Rule | Value |
|---|---|
| Rotated range | ! (33) … ~ (126) |
| Characters in the range | 94 |
| Rotation amount | 47 (half of 94) |
| Left untouched | Space, tabs, newlines, non-ASCII |
Because 47 is exactly half of 94, ROT47 is its own inverse: rotating a character twice returns it to its starting position, so encrypting and decrypting are the same operation — exactly the property that makes ROT13 convenient for letters, extended here to the whole printable range.
The ROT Family
ROT47 sits at the end of a small family of related rotations. Understanding the family makes each member's job clear:
| Name | Rotates | Example |
|---|---|---|
| ROT13 | Letters only | hello → uryyb |
| ROT5 | Digits 0–9 only | 123 → 678 |
| ROT18 | Letters + digits | ROT13 + ROT5 combined |
| ROT47 | All printable ASCII | Hello! → w6==@P |
Step-by-Step Example
Encode "Hello, World!". Take each character, subtract 33 to find its position in the rotated range, add 47, wrap modulo 94, and add 33 back. A few steps:
- H is code 72. 72 − 33 = 39; 39 + 47 = 86; 86 mod 94 = 86; 86 + 33 = 119, which is
w. - e is code 101. 101 − 33 = 68; 68 + 47 = 115; 115 mod 94 = 21; 21 + 33 = 54, which
is
6. -
The comma is code 44. 44 − 33 = 11; 11 + 47 = 58; 58 + 33 = 91, which is
[. - The space is code 32, below the rotated range, so it stays a space.
Continuing through the phrase gives w6==@[ (@C=5P. Paste it into the ROT47 Output box above and the original text reappears on the left — the same rotation, applied once more.
Example Reference Table
| Plain Text | ROT47 |
|---|---|
| hello | 96==@ |
| Hello, World! | w6==@[ (@C=5P |
| 12345 | `abcd |
| #?&/ | RnU^ |
| SimplyCalculated | $:>A=Jr2=4F=2E65 |
Paste any plain-text value into the tool to confirm the rotated output, or paste a rotated value into the ROT47 Output box to confirm it flips back. Notice that digits and symbols rotate too — the whole point of ROT47 over ROT13.
Where ROT47 Is Useful
ROT47 is the classic choice when you want text to be unreadable at a glance but trivially recoverable by anyone in the know. Common uses: hiding puzzle solutions, quiz answers, and spoilers on forums; obscuring API keys or connection strings in shared configuration snippets (as a deterrent against shoulder-surfing, never as security); and making a comment or message stand out in code review as deliberately encoded. Because the output uses only printable ASCII, ROT47 text travels safely through email, chat, and code — nothing to escape, nothing to corrupt.
Troubleshooting & Common Mistakes
My output is still full of readable letters
If letters survive unchanged, the input was probably not pure ASCII — accented letters and emoji are outside the rotated range and pass through. If instead the whole message looks half-rotated, check that you are not mixing ROT13 and ROT47; they are different ciphers and their outputs cannot be combined.
I decoded someone else's text and got garbage
Confirm the source really used ROT47 and not ROT13, ROT18, or Base64. A quick tell: ROT47 output contains symbols and digits in every word; ROT13 output never contains symbols, and Base64 always ends with recognizable patterns of A–Z, a–z, 0–9, +, /, and =.
Spaces and line breaks survived — is that a bug?
No. Spaces (code 32) and newlines are intentionally left untouched by ROT47, so the layout of your original text is preserved. That is what keeps the cipher reversible without losing formatting.
How This Cipher Compares to Other Classical Ciphers
ROT47 is one of several classical ciphers covered on this site. It shares its core mechanism with Caesar — a fixed shift through a character range — but extends that range to the full printable ASCII set instead of just letters, which is why it obfuscates rather than secures.
| Cipher | Mechanism | What Makes It Different |
|---|---|---|
| Caesar Cipher | Substitution | Shifts every letter by one fixed number (the key) through the alphabet — the simplest classical substitution cipher. |
| Atbash Cipher | Substitution (fixed) | A special case of substitution with no key at all — it always mirrors the alphabet (A↔Z, B↔Y, ...). |
| Vigenère Cipher | Polyalphabetic substitution | Repeats a keyword to shift each letter by a different amount, defeating simple frequency analysis that breaks Caesar. |
| Beaufort Cipher | Polyalphabetic substitution (reciprocal) | A variant of Vigenère's idea that is self-reciprocal — the same operation both encrypts and decrypts. |
| Playfair Cipher | Digraph substitution | Encrypts letters two at a time using their positions in a 5×5 key square — the first practical digraph cipher (1854). |
| Affine Cipher | Mathematical substitution | Encrypts using a linear function (ax + b mod 26) with two keys instead of one shift value. |
| ROT47 (this page) | Substitution (extended range) | Applies a Caesar-style shift across the full printable ASCII range, not just letters — used to obfuscate text online (e.g. spoilers), not for security. |
| Rail Fence Cipher | Transposition | Rearranges letter order in a zigzag pattern instead of substituting letters — a fundamentally different technique from every cipher above. |
| A1Z26 | Encoding (not a cipher) | Simply maps each letter to its position number (A=1...Z=26) — a puzzle/encoding convention, not intended for real secrecy. |
| NATO Phonetic Alphabet | Encoding (not a cipher) | Replaces each letter with a spoken code word (Alfa, Bravo, Charlie…) for reliable voice transmission on noisy radios — built for clarity, not secrecy. |