ROT47 encoder and decoder — hide text, numbers and symbols

Paste text and ROT47 replaces each visible ASCII character, including digits and symbols, with the character 47 places further along; paste the result back in to undo it.

Live demo · real result from this tool

Result

!2DDH@C5i 9F?E6Ca

Processed on your device — nothing is uploaded.

How to use the ROT47 encoder and decoder

  1. Type or paste the text into Your text. The tool comes loaded with a sample line to show the effect.
  2. Read the Result underneath; it updates from what you entered.
  3. 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?
ROT47 text is full of symbols such as @, =, > and ? mixed with letters, and it keeps the original spaces, so word lengths look normal. Lower-case English words often turn into digits and capitals, because a to h become 2 to 9. If a short test run through the tool gives readable text, it was ROT47.
Is there a decode button?
No, and none is needed. There are 94 characters in the cycle and the shift is 47, exactly half, so encoding twice lands every character back where it started. Paste ROT47 text into Your text to read it.
Can I use ROT47 to store a password?
No. ROT47 has no key, so anyone who knows the trick, or uses this page, reads the password at once. Use a password manager, and a proper hash function on the server side.
Why are my line breaks and emoji unchanged?
Only the characters from ! (code 33) to ~ (code 126) are rotated. Spaces, tabs, line breaks, accented letters, emoji and every other non-ASCII character are copied across as they are.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close