Overview
Introduction
ROT13 is well known for lightly obscuring text without touching numbers or symbols.
ROT47 extends the same idea across the full printable ASCII range, scrambling digits and punctuation as well.
What Is ROT47 Encoder/Decoder?
A Caesar-style substitution cipher that shifts each printable ASCII character (codes 33 through 126) by 47 places within that 94-character range, wrapping around at the end.
It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.
How ROT47 Encoder/Decoder Works
For each character, if its code falls within 33-126, the tool subtracts 33, adds 47, takes the result modulo 94, and adds 33 back, producing the shifted character.
Characters outside that range pass through unchanged.
When To Use ROT47 Encoder/Decoder
Use it to lightly obscure text (like a spoiler or answer) in forums that don't support spoiler tags, since it scrambles more than just letters.
It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.
Often used alongside ROT13 Encoder/Decoder and Case Randomizer.
Features
Advantages
- Self-inverse: the same operation both encodes and decodes.
- Scrambles digits and punctuation, not just letters, unlike ROT13.
- Leaves characters outside the printable range untouched, so spaces and line breaks survive and the text keeps its original shape.
Limitations
- Not real encryption; it's trivially reversible and offers no security.
- Covers printable ASCII only, so accented and non-Latin characters pass through unchanged and expose part of the original text.
Examples
Best Practices & Notes
Best Practices
- Use ROT13 instead if you only want letters obscured and want numbers/punctuation to stay readable.
- Use it to hide spoilers or puzzle answers from casual reading, never to protect anything that actually matters.
- Scan the output for untouched non-ASCII characters, which stand out sharply and can give the content away.
Developer Notes
The shift is computed as `33 + ((code - 33 + 47) % 94)`, operating over the 94-character printable ASCII range starting at '!' (33) through '~' (126); this is the same transform whether encoding or decoding, since 47 is exactly half of 94.
ROT47 Encoder/Decoder Use Cases
- Lightly obscuring spoilers or answers in forum posts
- Encoding text for puzzles or novelty ciphers
- Demonstrating Caesar-cipher concepts over the full ASCII range
Common Mistakes
- Assuming ROT47 provides real security; it does not.
- Applying it to text mixing several scripts and assuming everything is obscured, when only the ASCII portion is shifted at all.
Tips
- Run the tool a second time on the output to decode it back to the original.
- Because 47 is exactly half of the 94-character range, a second pass returns the original, which is why a single tool covers both directions.