---
title: "Atbash"
description: "Mirror the alphabet. A becomes Z, B becomes Y. Hebrew in origin, one key, self-inverse."
canonical_url: "https://ciphers.agntn.dev/ciphers/atbash"
---
# Atbash

> Mirror the alphabet. A becomes Z, B becomes Y. Hebrew in origin, one key, self-inverse.

<cipher-facts name="atbash">



</cipher-facts>

Each letter maps to its mirror: A to Z, B to Y, M to N. Twice is the identity, so `encode` and `decode` are one operation. Case survives, everything else passes through.

```ts
const atbash = create("atbash");
atbash.encode("HELLO").text; // "SVOOL"
atbash.encode("Hello, World!").text; // "Svool, Dliow!"
atbash.decode("ZGGZXP ZG WZDM").text; // "ATTACK AT DAWN"
```

Atbash is the [Affine](https://ciphers.agntn.dev/ciphers/affine) cipher with `a = 25` and `b = 25`. Check it if you don't believe me, the playground is right there.


## Sitemap

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