Skip to main content
DevTools24

Шифр ROT13

Кодирование и декодирование текста с использованием ROT13 или пользовательских сдвигов шифра Цезаря. ROT13 самообратим — примените его дважды, чтобы получить оригинал.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
About Caesar Cipher:
  • ROT13: Shift by 13, self-reversing (encode = decode)
  • • Each letter is replaced by one that is N positions down the alphabet
  • • Non-alphabetic characters (numbers, symbols, spaces) are preserved
  • • Named after Julius Caesar who used it for secret correspondence
  • • Not secure for actual encryption - only for obfuscation/fun

ROT13 - Технические детали

ROT13 shifts each letter by 13 positions in the alphabet. Since there are 26 letters, applying ROT13 twice returns the original text. It was commonly used to hide spoilers in forums.

Альтернатива командной строки

# Using tr command
echo 'Hello World' | tr 'A-Za-z' 'N-ZA-Mn-za-m'

# Using Python
python3 -c "import codecs; print(codecs.encode('Hello', 'rot_13'))"