---
title: "ROT-13"
description: "A Caesar with shift 13, so it's its own inverse. Encode twice and you're back."
canonical_url: "https://ciphers.agntn.dev/ciphers/rot13"
---
# ROT-13

> A Caesar with shift 13, so it's its own inverse. Encode twice and you're back.

<cipher-facts name="rot13">



</cipher-facts>

Thirteen is half of 26, so shifting twice is a full turn. `encode` and `decode` do the same thing, and `info().selfInverse` admits it. One key, hides nothing. It's the Usenet way of keeping a spoiler out of immediate view, and that's all it was ever for.

```ts
const rot13 = create("rot13");
rot13.encode("HELLO").text; // "URYYB"
rot13.encode("URYYB").text; // "HELLO"
rot13.encode("Hello, World! 123").text; // "Uryyb, Jbeyq! 123"
```

Letters only. Digits and punctuation pass through, and that's the whole difference from [ROT-47](https://ciphers.agntn.dev/ciphers/rot47).


## Sitemap

See the full [sitemap](https://ciphers.agntn.dev/sitemap.md) for all pages.
