Search for a tool
ROT-47 Cipher

Tool to decrypt/ encrypt with Rot47. The ROT-47 cipher is a variant of the ROT-13 suitable for ASCII characters, exactly a subset of 94 printable characters.

Results

ROT-47 Cipher -

Tag(s) : Substitution Cipher, Internet

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'ROT-47 Cipher' tool for free! Thank you!

ROT-47 Cipher

ROT47 Decoder

 

ROT47 Encoder

 

Answers to Questions (FAQ)

What is Rot-47? (Definition)

The Rot-47 is a shift cipher that allows to encode all visible ASCII characters (where Rot13 cipher can only encode letters).

Rot47 uses a 94-character alphabet that is a subset of the ASCII table characters between the character 33 ! and the character 126 ~.

How to encrypt using Rot-47?

Rot47 encryption consists in replacing a character with another located 47 positions after in the alphabet. The conversion table to shift is:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Example: DCODE is encrypted sr~st with ROT-47

How to decrypt Rot-47 cipher?

The decryption of the Rot-47 is identical to the encryption because the substitution alphabet used is reversible.
PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO

Example: #@E\cf is decoded Rot-47

Why the shift of 47?

The ASCII code defines 94 printable characters, so a rotation of half (94/2 = 47) makes it possible to obtain a symmetric cipher, similar to ROT13 (for the 26 letters of the alphabet).

How to recognize ROT-47 ciphertext?

The message uses ASCII characters and contains common letters as 6 or t which are the ciphered values of E and e.

Rot47 is a simple way to encode a message on discussion forums or social networks.

What are the variants of the Rot-47 cipher?

Rot-47 is a variant of Rot13, itself a variant of the Caesar cipher, a special case of shift cipher.

What is the algorithm of Rot 47? (Pseudo-code)

An implementation of ROT47 could be:

// Pseudo-code
function rot47(string) {
foreach (char in string) {
code = ascii_code(char)
if (32 < code < 80) char = ascii_char(code + 47)
if (79 < code < 127) char = ascii_char(code - 47)
}
return string
}

// Javascript
function rot47(x){
var s='';
for(var i=0;i<x.length;i++){
var j=x.charCodeAt(i);
if((j>=33)&&(j<=126)){
s+=String.fromCharCode(33+((j+14)%94));
}
else {
s+=String.fromCharCode(j);
}
}
return s;
}

Source code

dCode retains ownership of the "ROT-47 Cipher" source code. Any algorithm for the "ROT-47 Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "ROT-47 Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "ROT-47 Cipher" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "ROT-47 Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/rot-47-cipher
In a scientific article or book, the recommended bibliographic citation is: ROT-47 Cipher on dCode.fr [online website], retrieved on 2025-04-24, https://www.dcode.fr/rot-47-cipher

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'ROT-47 Cipher' tool for free! Thank you!


https://www.dcode.fr/rot-47-cipher
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback