LazyTools

🔒 Every tool runs in your browser, the files and values you enter are never uploaded to any server. How it works

🔀 ROT47 Encoder / Decoder

ROT13's bigger cousin: ROT47 rotates every printable ASCII character, letters, digits and symbols, and applying it again undoes it.

Output

Transformed in your browser, nothing you type is uploaded.

Rate this tool:
Anonymous, no account, no identifier

How the rot47 encoder / decoder works

ROT47 shifts each character within the 94 printable ASCII characters (from "!" at code 33 to "~" at code 126) by 47 places, wrapping around. The rule for a character with ASCII code c is 33 + ((c − 33 + 47) mod 94): subtract 33 to index from zero, add 47, wrap with mod 94, then add 33 back. Because 47 is half of 94, applying it twice returns the original, so, like ROT13, a single operation both encodes and decodes. Unlike ROT13, which only touches letters, ROT47 also scrambles digits and punctuation, producing a more thoroughly garbled result; the space character (code 32) sits outside the range and is left unchanged.

ROT47 is popular in Unix and programming circles for lightly obscuring text, spoilers, config snippets, joke answers, where ROT13 leaves numbers and symbols readable. It provides no security whatsoever; it's a reversible, keyless rotation, useful only for "don't read this by accident".

Frequently asked questions

How is ROT47 different from ROT13?

ROT13 rotates only the 26 letters, leaving digits and punctuation untouched. ROT47 rotates all 94 printable ASCII characters, so numbers and symbols are scrambled too, a more complete obfuscation.

Why is the same operation used to encode and decode?

Because it rotates by 47 within a 94-character range, and 47 is exactly half of 94. Applying it twice is a full rotation back to the start, so ROT47 is its own inverse.

What is ROT47 used for?

Lightly hiding text where ROT13 isn't enough because the content has numbers or symbols, spoilers, puzzle answers, snippets. It offers no real security.

Is ROT47 secure?

No. It's a fixed, keyless rotation reversible by anyone. It obscures, it doesn't protect.

What does ROT47 do to the letter "A"?

"A" has ASCII code 65. Applying 33 + ((65 − 33 + 47) mod 94) gives 33 + (79 mod 94) = 33 + 79 = 112, which is the character "p". So "A" becomes "p", and running "p" back through ROT47 returns "A".

Does ROT47 change spaces?

No. The space character (ASCII 32) falls just below the "!" to "~" range that ROT47 rotates, so spaces, and any control characters or newlines, are passed through unchanged, which keeps word boundaries visible in the output.

Why choose ROT47 over ROT13?

ROT13 leaves numbers and symbols readable because it only touches the 26 letters. When the text contains digits, punctuation or code where those should also be hidden, for example a config snippet or a spoiler with numbers, ROT47 rotates the whole printable-ASCII set for a more complete obfuscation.

Is my text uploaded?

No, ROT47 is applied in your browser.

Related codes & ciphers

From the blog