Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

ROT47 Encoder & Decoder Online

Encode or decode ROT47 as you type. ROT47 rotates every printable ASCII character, so letters, digits and symbols are all scrambled, and the same operation decodes it.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up
The same operation encodes and decodes
0 chars
ROT47
Runs in your browser. Nothing is uploaded. Tip: run it twice to get the original back

How to use the ROT47 tool#

  1. Type or paste your text into the left box. The ROT47 result appears on the right as you type.
  2. To decode, paste ROT47 text the same way: ROT47 is its own inverse.
  3. Copy the result, or press the swap button to run it again and get the original back.
  4. Check Every ROT variant under the tool to compare ROT47 with ROT13, ROT18 and ROT5.

Examples#

Encode a greeting

Input
Hello, World!
Output
w6==@[ (@C=5P

Unlike ROT13, the comma and exclamation mark change too. Only the space stays the same.

Encode letters and digits

Input
Dev 247
Output
s6G acf

Digits are rotated as well: 2 becomes a, 4 becomes c, 7 becomes f.

Decode ROT47

Input
s6G acf
Output
Dev 247

Running ROT47 again returns the original text.

What is ROT47?#

ROT47 replaces every printable ASCII character with the character 47 positions further along, wrapping around within the 94 characters from ! (code 33) to ~ (code 126). Letters, digits and punctuation are all rotated. Spaces, line breaks and any character outside that range, such as accented letters or emoji, are left unchanged.

Because 47 is exactly half of 94, applying ROT47 twice returns the original text. Like ROT13, it is its own inverse: the same operation encodes and decodes.

How ROT47 works#

For each character with ASCII code c between 33 and 126:

plaintext
new = 33 + ((c - 33 + 47) mod 94)

For example, H has code 72. 72 − 33 = 39, plus 47 is 86, and 33 + 86 = 119, which is w.

RangeMaps to
! to O (codes 33–79)P to ~ (codes 80–126)
P to ~ (codes 80–126)! to O (codes 33–79)

In other words, the two halves of the printable ASCII range swap places.

ROT47 vs ROT13#

ROT13ROT47
Characters rotated26 letters (both cases)94 printable ASCII characters
Digits and symbolsUnchangedRotated
Keeps letter caseYesNo (letters can become digits or symbols)
Hello, World!Uryyb, Jbeyq!w6==@[ (@C=5P
Self-inverseYesYes

ROT47 hides more of the text, because numbers, URLs and email addresses are scrambled too. It is still not encryption: there is no key and anyone can reverse it.

Where ROT47 is used#

  • Puzzles and capture-the-flag (CTF) challenges, where a string full of symbols is a common hint.
  • Hiding spoilers or answers that contain numbers, which ROT13 would leave readable.
  • Light obfuscation of strings in scripts and config files, so they are not readable at a glance.

ROT47 in code#

JavaScript#

javascript
const rot47 = (s) =>  s.replace(/[!-~]/g, (c) => String.fromCharCode(33 + ((c.charCodeAt(0) - 33 + 47) % 94))); rot47('Hello, World!'); // "w6==@[ (@C=5P"

Python#

python
def rot47(s: str) -> str:    return ''.join(        chr(33 + (ord(c) - 33 + 47) % 94) if 33 <= ord(c) <= 126 else c        for c in s    )

Command line#

bash
echo 'Hello, World!' | tr '!-~' 'P-~!-O'   # w6==@[ (@C=5P

Common errors and fixes#

  • The decoded text is still scrambled

    The text was probably encoded with ROT13 or another rotation, not ROT47. Compare the variants under the tool, or try the Caesar cipher solver with the Printable ASCII alphabet.

  • Spaces and accented letters were not rotated

    That is correct. ROT47 only rotates characters from ! (33) to ~ (126). Spaces, line breaks and non-ASCII characters always stay the same.

  • Pasting ROT47 into a shell or JSON breaks it

    ROT47 output often contains ", ', \ and $, which those formats treat specially. Quote or escape the value, or pick ROT13 if you only need to hide letters.

Frequently asked questions#

How do I decode ROT47?

Apply ROT47 again. The 94 printable ASCII characters are rotated by exactly half (47), so doing it twice brings every character back.

Why is it called ROT47?

Each character is rotated 47 places within the 94 printable ASCII characters. 47 is half of 94, which is what makes it self-inverse.

Is ROT47 more secure than ROT13?

It hides more characters, but neither is secure. Both have no key and can be reversed instantly by anyone.

Does ROT47 change spaces?

No. The space is ASCII code 32, just outside the rotated range (33–126), so spaces and line breaks stay where they are.

Is my text uploaded?

No. ROT47 runs entirely in your browser.

Your next tool is one search away.

Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

Browse all tools

Tip: press Ctrl D to bookmark dev247.