ROT13 Encoder / Decoder
Apply ROT13 cipher to text.Runs in this tab.⌘ ↵ runs it
ROT13 is its own inverse — encoding and decoding are the same operation.
How to use ROT13 Encoder / Decoder
- Paste text into the Text panel. The ROT13 panel updates immediately. There is no encode or decode switch.
- Paste the result back into Text to recover the original. Letters move 13 places. Digits and punctuation stay put.
ROT13 in the browser, in Linux, and in Python
ROT13 shifts each English letter 13 places. The alphabet has 26 letters, so the same shift returns the original. There is no mode switch on this page for that reason.
Hello, World! becomes Uryyb, Jbeyq!. Paste Uryyb, Jbeyq! and you get Hello, World! again. The comma, space, and exclamation mark never move. Digits stay. Letters outside A-Z and a-z stay.
That is Caesar shift 13. The Caesar cipher opens on shift 13 and lets you pick any other shift from 1 to 25.
Is ROT13 encoding or encryption?
ROT13 is encoding. Anyone who can read the alphabet can reverse it, because the shift is fixed and public. Encryption needs a secret that is hard to guess. Do not use ROT13 to hide a password, a token, or anything else you need to keep private.
Decrypt ROT13 in Linux
tr does the same map. It encodes and decodes, because the transform is its own inverse:
echo 'Uryyb, Jbeyq!' | tr 'A-Za-z' 'N-ZA-Mn-za-m'
That prints Hello, World!.
ROT13 in Python
In Python 3, rot_13 is a text codec. Use codecs, not str.encode:
import codecs
codecs.encode('Hello, World!', 'rot_13') # 'Uryyb, Jbeyq!'
codecs.decode('Uryyb, Jbeyq!', 'rot_13') # 'Hello, World!'
'Hello, World!'.encode('rot_13') raises LookupError: 'rot_13' is not a text encoding; use codecs.encode() to handle arbitrary codecs.
Next step
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeQuestions
Is ROT13 encoding or encryption?
How to decrypt ROT13 in Linux?
How do I do ROT13 encoding in Python?
Is there a separate ROT13 decoder?
Comments
More in Encoding & Decoding
- Base64 Encoder / Decoder
- URL Encoder / Decoder
- HTML Entity Encoder / Decoder
- JWT Decoder
- Base32 Encoder / Decoder
- Morse Code Translator
- Binary to Text Converter
- Hex to Text Converter
Comments