> For the complete documentation index, see [llms.txt](https://sarpers-organization.gitbook.io/ctftricks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sarpers-organization.gitbook.io/ctftricks/_chapter-intro-3/obfuscation/rot13-decoding/trick-0395.md).

# Decode ROT13 Username

***

ROT13 is a simple substitution cipher where each letter is replaced by the letter 13 places after it in the alphabet. Because it is symmetric, applying ROT13 twice recovers the original text. It's often used for simple obfuscation rather than true encryption in CTF challenges.

To decode a ROT13 string like `wbxre`, simply apply the ROT13 transformation. Many online tools, programming languages, or even command-line utilities can do this.

For example, decoding `wbxre` yields:

```
wbxre -> joker
```

In programming languages, built-in functions or libraries can often perform ROT13. In Python, the `codecs` module provides a built-in `rot_13` codec for performing the transformation:

```python
import codecs
encoded_string = "Hello world"
decoded_string = codecs.encode(encoded_string, 'rot_13')
print(decoded_string)
```

On many systems, a dedicated `rot13` command-line utility is available. This simple utility performs the ROT13 Caesar cipher and can be used to encode or decode text by shifting each letter 13 places. To decrypt a ROT13 string using this command, you can simply pass the string as an argument:

```bash
rot13 "wbxre"
```

Alternatively, the `tr` command (translate characters) can be used to perform the ROT13 substitution by defining the character sets to translate from and to. This is a common method for decoding ROT13 directly in the terminal:

```bash
echo "wbxre" | tr 'A-Za-z' 'N-ZA-Mn-za-m'
```
