Atbash Cipher
Type or paste text and get its Atbash mirror as you type — A becomes Z, B becomes Y, and so on down the alphabet. Atbash undoes itself, so the same box encodes and decodes, and the working panel shows the alphabet table and every swap. Free, no sign-up, and nothing leaves your browser.
Alphabet table and working
Each letter at position n in the alphabet (A = 1, Z = 26) becomes the letter at position 27 − n. Encoding and decoding are the same step, so running the result through again gives back your text.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Atbash | Z | Y | X | W | V | U | T | S | R | Q | P | O | N |
| Plain | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Atbash | M | L | K | J | I | H | G | F | E | D | C | B | A |
Letters in your text are highlighted in the plain rows; the letters they become are highlighted below them.
Letter by letter — the first 10 letters
| Letter | Position | 27 − position | Result |
|---|---|---|---|
| H | 8 | 19 | S |
| E | 5 | 22 | V |
| L | 12 | 15 | O |
| L | 12 | 15 | O |
| O | 15 | 12 | L |
| W | 23 | 4 | D |
| O | 15 | 12 | L |
| R | 18 | 9 | I |
| L | 12 | 15 | O |
| D | 4 | 23 | W |
How to Use the Atbash Cipher
- 1. Enter your text. Type or paste it into the box. Atbash has no key, so there is nothing else to set.
- 2. Read the result. The mirrored text appears as you type. Paste Atbash text in and you get the original back — the same step encodes and decodes.
- 3. Choose what to keep. Untick case, spaces or punctuation to get capitals only, one unbroken run of letters, or letters alone — the usual way cipher text is presented.
- 4. Check the working. The alphabet table highlights the letters you used and the letters they became, and the table under it works through the first dozen letters.
How Atbash Works
Write the alphabet forwards, write it backwards underneath, and swap every letter for the one below it: A↔Z, B↔Y, C↔X, and so on to M↔N in the middle. As a formula, the letter at position n (A = 1, Z = 26) becomes the letter at position 27 − n, so H (8) becomes S (19). Counting from zero, as cryptographers usually do, the rule is 25 − x — which makes Atbash the affine cipher with a = 25 and b = 25.
| A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Z | Y | X | W | V | U | T | S | R | Q | P | O | N |
Worked example. Hello World becomes Svool Dliow: H (8) → S (19), E (5) → V (22), L (12) → O (15) and O (15) → L (12). Feed Svool Dliow back in and Hello World comes out. Each letter keeps its case and the space passes straight through, so the result has the same shape as your text — which is also why Atbash is so easy to spot.
The swap throws up the odd curiosity. WIZARD enciphers to DRAZIW — the same word spelled backwards — because W and D, I and R, Z and A are all mirror pairs that happen to sit at mirrored places in the word.
Where Atbash Comes From
Atbash began as a substitution of the Hebrew alphabet, and its name spells out the rule. Aleph (א), the first letter, swaps with tav (ת), the last; bet (ב), the second, swaps with shin (ש), the second-to-last — a-t-b-sh. With 22 Hebrew letters there are 11 pairs.
The best-known examples are in the Book of Jeremiah. The name Sheshach (ששך), in Jeremiah 25:26 and 51:41, corresponds letter for letter to Babel (בבל), Babylon, under this swap, and Leb-kamai (לב קמי) in 51:1 corresponds to Kasdim (כשדים), the Chaldeans. Jeremiah 51:41 also names Babylon openly in the same verse, so the substitution can hardly have been meant to hide anything; it is usually read as wordplay, and how the forms entered the text is still debated.
How to Break Atbash, and Why It Is Not Secure
Atbash has nothing secret in it. There is no key to guess: anyone who knows the method can read the message, and the mirror alphabet is one of the first things a puzzle solver tries. Even without that guess, every E in the plain text becomes V and every T becomes G, so the most common letters in the cipher text point straight back to the most common letters of the language. That is frequency analysis, and the Letter Frequency Counter will do the counting.
Treat Atbash as a puzzle and a first lesson: it shows what a substitution cipher is in one line of arithmetic. For a version with a real key, try the Affine Cipher, which generalises the same idea; for one that changes the substitution from letter to letter, try the Vigenère cipher.
Frequently Asked Questions
- What is the Atbash cipher?
- Atbash is a substitution cipher that reverses the alphabet: A becomes Z, B becomes Y, C becomes X, and so on to M and N, which swap with each other. It has no key, and the same swap both encodes and decodes. It started as a substitution of the Hebrew alphabet and is now a staple of puzzles and cryptography lessons.
- How do you decode Atbash?
- Apply Atbash again. Each letter swaps with its mirror, so enciphering twice returns the original —
Svoolgoes back toHello. That is why this tool has a single box rather than separate encode and decode modes: paste the cipher text in and read the plain text out. - Is Atbash the same as a Caesar cipher?
- No. A Caesar cipher slides every letter the same distance along the alphabet, so the letters keep their order (ABC becomes DEF). Atbash reflects the alphabet, so the order reverses (ABC becomes ZYX), and no Caesar shift can do that. Both are special cases of the affine cipher, though: Caesar has a = 1, Atbash has a = 25 and b = 25.
- What happens to numbers, spaces and accented letters?
- Digits, spaces and punctuation pass through unchanged unless you choose to strip them. Accented Latin letters count as their plain letter, so é is enciphered as e would be, to v. Letters from other alphabets, such as Cyrillic or Greek, are left as they are, and the tool tells you how many it found.
- Is Atbash in the Bible?
- Yes. The clearest cases are in the Book of Jeremiah: Sheshach (25:26 and 51:41) matches Babel letter for letter under the Hebrew Atbash, and Leb-kamai (51:1) matches Kasdim, the Chaldeans. Because Babylon is also named openly nearby, the swap is usually understood as wordplay rather than secret writing.
- Why is it called Atbash?
- The name strings together the first two swaps of the Hebrew alphabet: aleph with tav (א–ת) and bet with shin (ב–ש), giving a-t-b-sh. Other Hebrew letter swaps were named the same way — Albam, for instance, pairs aleph with lamed and bet with mem.