The alphabet backwards, its own inverse
Atbash cipher
Encode and decode the Atbash cipher, in which the alphabet is mirrored: A becomes Z, B becomes Y, andMEET AT NOON becomes NVVG ZG MLLM. There is no key; apply it twice and the text returns.
How to use it
Type in either box. Atbash has no key and no direction: the same rule encodes and decodes, so both boxes do the same thing.
Letters are mirrored in the alphabet, A with Z, B with Y, M with N. Spaces, digits and punctuation pass through, and accented letters fold to their base letter.
Apply it twice and the text comes back. If a message looks like Atbash, paste it and read; there is nothing to guess.
The oldest substitution
Atbash is older than Caesar. It comes from the Hebrew scribes, who wrote the alphabet backwards under itself and swapped each letter for the one beneath: aleph for tav, bet for shin, which is where the name comes from. The Book of Jeremiah writes Babel as Sheshach twice, and hides the Chaldeans as Leb Kamai once. Applied to the Latin alphabet the rule is the same: the first letter for the last, the second for the second last, and so on to the middle, where M and N swap.
Because the mirror is its own inverse, encoding and decoding are the same operation. MEET AT NOONbecomes NVVG ZG MLLM, and NVVG ZG MLLM becomes MEET AT NOON. That is why the tool above has no direction and no key field: whatever you type in either box, the other shows the mirror. Secret is HVXIVG; wizard is DRAZIW; the first three letters of the alphabet are the last three reversed, ZYX.
As a cipher it protects nothing, and it never did. There is exactly one Atbash, so a reader who suspects it needs no key, and the frequency of letters survives the mirror: the commonest letter of the ciphertext is the mirror of E. It earns its place as the first substitution cipher to learn, the one that shows the idea with nothing else attached, and as a puzzle in books and games, where a message full of Z, Y and X gives it away to anyone who has met it once.
Table
The 26 letters with their mirrors, thirteen pairs read twice, derived from the alphabet in one line: each letter and the one at the same distance from the other end.
| Letter | Becomes |
|---|---|
| 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 |
| N | M |
| O | L |
| P | K |
| Q | J |
| R | I |
| S | H |
| T | G |
| U | F |
| V | E |
| W | D |
| X | C |
| Y | B |
| Z | A |
Frequently asked
How does the Atbash cipher work?
The alphabet is written backwards under itself: A pairs with Z, B with Y, C with X, and so on to M with N. Each letter is swapped for its partner. MEET AT NOON becomes NVVG ZG MLLM, and applying the rule again gives MEET AT NOON. There is no key.
Where does the name come from?
From the Hebrew alphabet, where the cipher was first used: aleph, the first letter, swaps with tav, the last, and bet, the second, with shin, the second last. Aleph-tav-bet-shin gives atbash. The Book of Jeremiah uses it to write Babel as Sheshach, and scholars have read other hidden names the same way.
Is Atbash a Caesar cipher?
No. Caesar shifts the alphabet; Atbash reflects it. A shift moves every letter the same distance in one direction, while the mirror sends A to the far end and M only one step. The same phrase gives PHHW DW QRRQ under Caesar at three and NVVG ZG MLLM under Atbash, and only one of the two comes back when applied twice.
Why teach it first?
Because it is the whole idea of a substitution cipher with nothing else attached: no key to remember, no direction to get wrong, and a rule a child can apply with an alphabet written on a strip of paper folded in half. Once the mirror is understood, the Caesar shift is one idea further, and the keyed ciphers one more.
Is it secure?
Not in the slightest. There is only one Atbash, so anyone who suspects it reads the message at once, and the letter frequencies survive in mirrored form. It is a puzzle and a teaching tool, and it was a mild veil even in antiquity.