Atbash Cipher — Mirror Alphabet Encoder

Encode or decode text using the ancient Hebrew mirror cipher. A becomes Z, B becomes Y — symmetric and self-reversing.

11 characters
Mirror alphabet · A↔Z, B↔Y, C↔X … Self-inverse: apply Atbash again to reverse it. Numbers and punctuation pass through.Client-side · no upload

Atbash Mirror Mapping Table:

Plain
A
B
C
D
E
F
G
H
I
J
K
L
M
Cipher
Z
Y
X
W
V
U
T
S
R
Q
P
O
N

What Is the Atbash Cipher?

The Atbash cipher is one of the oldest known encryption methods, dating back to approximately 600-500 BCE. Originally designed for the Hebrew alphabet, it is a monoalphabetic substitution cipher that works by mirroring the alphabet — the first letter is swapped with the last, the second with the second-to-last, and so on. When adapted to the English alphabet, A maps to Z, B maps to Y, C maps to X, and the pattern continues symmetrically through the entire alphabet.

The name "Atbash" is itself a description of the cipher technique. It comes from the Hebrew letters Aleph-Tav-Beth-Shin: Aleph (first letter) pairs with Tav (last letter), and Beth (second letter) pairs with Shin (second-to-last letter). This mnemonic naming convention elegantly captures the entire algorithm in a single word.

Worked Examples: Encode, Decode, and Translate

Because Atbash is symmetric, the same operation both encodes and decodes — so this tool doubles as an Atbash encoder, decoder, and translator with no key and no separate mode. Type plain text to encode it, or paste Atbash text to translate it back. These are exact results from the converter above:

GoalInputAtbash output
Encode a phraseHELLO WORLDSVOOL DLIOW
Decode (identical step)SVOOL DLIOWHELLO WORLD
Keep case, numbers & symbolsZebra-7Avyiz-7
A full sentenceAttack at dawn!Zggzxp zg wzdm!
Decode a hidden quoteGsv jfrxp yildm ulcThe quick brown fox

Look at the first two rows: feeding SVOOL DLIOW back through Atbash returns HELLO WORLD. That is the self-inverse property in action — to decode any Atbash message, you simply run it through again. Want to practise by hand? Print the ready-made Atbash practice worksheet.

What Gets Transformed — and What Doesn't

Atbash mirrors only the 26 letters of the English alphabet, A–Z, and it preserves their case. Everything else passes through untouched: digits, spaces, punctuation, accented letters such as é and ñ, and non-Latin scripts (Cyrillic, Greek, Hebrew, emoji). For example, Café ☕ Mañana becomes Xzué ☕ Nzñzmz — the plain letters flip, but é, ñ, the space, and the ☕ stay exactly as typed. If you need those characters transformed too, Atbash is the wrong tool; it is defined only over a single 26-letter alphabet.

A common mistake: hunting for a separate "decode" button or an Atbash key. There is neither — Atbash has one fixed mapping and is its own inverse, so the same transform encodes and decodes. And because spaces and punctuation are preserved, the shape of a message — its word count and word lengths — stays visible after encoding. Atbash hides which letters you used, not the structure of your text, which is exactly why it is a puzzle and teaching cipher rather than real security. To see how it stacks up against Caesar, ROT13, and Vigenère, open the cipher comparison chart.

Historical Significance

The most famous use of the Atbash cipher appears in the Hebrew Bible. In the Book of Jeremiah (chapters 25:26 and 51:41), the prophet encodes the word "Babel" (Babylon) as "Sheshach" using the Hebrew Atbash mapping. Scholars debate whether this was done for mystical reasons — a form of sacred encoding common in Kabbalistic tradition — or for political caution, avoiding directly naming the Babylonian empire that had conquered Judah.

The cipher is also associated with Jewish mysticism and Kabbalah, where letter transformations carry spiritual significance. In Kabbalistic tradition, the Atbash cipher is one of three classical Hebrew ciphers, alongside Albam (shifting by 13 positions in the 22-letter Hebrew alphabet) and Atbah (a more complex permutation). These transformations were used to discover hidden meanings in Torah texts.

Mathematical Properties

The Atbash cipher has an elegant mathematical structure. For an alphabet of size N (26 for English), the mapping function is: f(x) = (N - 1) - x, where x is the zero-based position of the letter. This function is an involution — applying it twice yields the original value: f(f(x)) = (N-1) - ((N-1) - x) = x. This self-inverse property means the same operation both encrypts and decrypts, similar to ROT13 but achieved through a completely different mapping.

An interesting consequence of the mirror mapping is that exactly one letter (if N is odd) or zero letters (if N is even) map to themselves. In the 26-letter English alphabet, no letter maps to itself — every letter changes. In the 22-letter Hebrew alphabet, also no letter is fixed. This contrasts with ROT13, where similarly no letter maps to itself, but the two ciphers produce entirely different substitution tables.

Modern Uses

Today the Atbash cipher serves primarily as an educational tool and puzzle element. It appears frequently in geocaching challenges, where cache owners use it to encode coordinates or clue words. Escape room designers favor it for its simplicity and the satisfying visual pattern of the mirror alphabet. The cipher is also a standard topic in introductory cryptography courses, illustrating concepts of substitution, involution, and the difference between ciphers with and without keys.

In popular culture, the Atbash cipher gained wider recognition through Dan Brown's novel The Da Vinci Code, where it plays a role in solving one of the story's puzzles. The cipher's ancient Hebrew origins and association with biblical mysteries make it a compelling narrative device, even though its cryptographic strength is effectively zero by modern standards.

Atbash vs. Other Simple Ciphers

Among the family of simple substitution ciphers, Atbash is unique in having no variable key. The Caesar cipher has 25 possible shifts, the Vigenere cipher uses a keyword of arbitrary length, and even ROT13 can be seen as a specific key choice (shift=13). Atbash, by contrast, is entirely deterministic — there is only one Atbash mapping for any given alphabet. This makes it the simplest possible substitution cipher but also the least secure, since any attacker who recognizes the technique can immediately decode the message.

Frequently Asked Questions

The Atbash cipher is a monoalphabetic substitution cipher originally used with the Hebrew alphabet. It works by replacing each letter with its "mirror" counterpart — the first letter maps to the last, the second to the second-to-last, and so on. In English: A maps to Z, B to Y, C to X, and vice versa. Like ROT13, Atbash is its own inverse.
The Atbash cipher maps each letter to its reverse position in the alphabet. The formula is simple: for a letter at position P (A=0), the encrypted letter is at position 25-P. So A(0) becomes Z(25), B(1) becomes Y(24), M(12) becomes N(13), and so on. The mapping is symmetric — encrypting twice returns the original text.