How Atbash works
Write the alphabet forwards, then write it backwards underneath. Each letter is replaced by the one below it:
ABCDEFGHIJKLMNOPQRSTUVWXYZZYXWVUTSRQPONMLKJIHGFEDCBA
The thirteen pairs are A ↔ Z, B ↔ Y, C ↔ X, D ↔ W, E ↔ V, F ↔ U, G ↔ T, H ↔ S, I ↔ R, J ↔ Q, K ↔ P, L ↔ O, M ↔ N. Because every pair swaps both ways, Atbash is its own inverse — encoding a message twice gives back the original — which is why this tool uses the same function for both boxes. In arithmetic terms, a letter at position p (A = 1 … Z = 26) becomes the letter at position 27 − p.
Worked example: WIZARD
| Letter | Position | 27 − position | Atbash |
|---|---|---|---|
| W | 23 | 4 | D |
| I | 9 | 18 | R |
| Z | 26 | 1 | A |
| A | 1 | 26 | Z |
| R | 18 | 9 | I |
| D | 4 | 23 | W |
WIZARD becomes DRAZIW — a neat example, because the result is the original word reversed. Puzzle-setters love finding words like this. Upper and lower case are preserved, and spaces, digits and punctuation pass through unchanged, so “Wizard of Oz” becomes “Draziw lu La”.
Origins: a Hebrew cipher
Atbash began with the Hebrew alphabet. Its name spells out the first swaps: aleph (the first letter) with tav (the last), and bet (the second) with shin (the second-to-last). Scholars identify a few likely uses in the Hebrew Bible, the best known in the Book of Jeremiah, where the name “Sheshach” (Jeremiah 25:26 and 51:41) reads as Babel, Babylon, once Atbash is applied to the Hebrew letters. Jewish commentators such as Rashi recognised it, and a survey by Scott Noegel of the University of Washington describes Jeremiah 25:26, 51:1 and 51:41 as the three sure instances (Jewish Bible Quarterly, 1996). The English version used here simply applies the same mirror idea to the 26 Latin letters.
Atbash, Caesar and other substitution ciphers
Atbash is a monoalphabetic substitution: every plaintext letter always maps to the same ciphertext letter. So is the Caesar cipher, but Caesar slides the alphabet along while Atbash flips it; of the 26 possible Caesar shifts, none reproduce Atbash. Both fall instantly to frequency analysis, and Atbash has no key at all, so once someone guesses the method the message is open.
Using Atbash in puzzles
- Escape rooms and treasure hunts: Atbash is easy to decode with a printed mirror alphabet, so it suits younger players.
- Spotting it: if a ciphertext has many Z, V and R letters, try Atbash — they are the mirrors of the common letters A, E and I.
- Layering: combine Atbash with the A1Z26 letter-to-number cipher or Morse code for a multi-step puzzle.
Decoding Atbash by hand
- Write A–M in a row and N–Z underneath it in reverse (Z under A, Y under B … N under M).
- For each cipher letter, find it in either row and write down the letter directly above or below it.
- Leave spaces, digits and punctuation as they are.
Common short words are a quick way to confirm you are looking at Atbash:
| Plain | THE | AND | YOU | ARE | SECRET |
|---|---|---|---|---|---|
| Atbash | GSV | ZMW | BLF | ZIV | HVXIVG |
The maths: Atbash as an affine cipher
Number the letters A = 0 to Z = 25. Atbash sends a letter at position x to 25 − x. Written as a formula that is E(x) = (25x + 25) mod 26, which makes Atbash a special case of the affine cipher, E(x) = (ax + b) mod 26, with a = b = 25. Applying it twice gives 25 − (25 − x) = x, which is why encoding and decoding are the same operation. Because 26 is even, no letter is its own mirror: every letter changes, so a message in Atbash never contains a plaintext letter in its original place.