Atbash cipher encoder and decoder
The Atbash cipher replaces each letter with the letter in the same position counted from the other end of the alphabet. A becomes Z, B becomes Y, M becomes N, and so on. There is no key and no shift to choose, and because the mapping is its own mirror image, running Atbash on encoded text decodes it.
The full mapping
| 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 |
The second half mirrors the first: N becomes M, O becomes L, up to Z becoming A. Mathematically, a letter at position i (A = 0) becomes the letter at position 25 − i.
Example
The tool's sample input shows a nice coincidence:
Wizard of Oz
→ Draziw lu La
"WIZARD" under Atbash is "DRAZIW", which is "WIZARD" spelled backward. Case is preserved, and spaces, digits and punctuation are left unchanged. Some puzzle makers enjoy this kind of accident; others strip spaces and punctuation before encoding so word lengths give nothing away.
Where Atbash comes from
Atbash originated as a substitution for the Hebrew alphabet. Its name is built from the first, last, second and second-to-last Hebrew letters: aleph, tav, bet and shin. Scholars have pointed to examples in the Book of Jeremiah, where "Sheshach" is read as an Atbash form of "Babel". The same mirror idea can be applied to any alphabet; this tool uses the 26-letter Latin alphabet.
Is Atbash secure?
No. There is exactly one possible key, so anyone who suspects Atbash can decode it instantly. It is a substitution cipher and also falls to simple frequency analysis. Use it for puzzles, treasure hunts and teaching, never for sensitive information.
Atbash vs other simple ciphers
- ROT13 rotates the alphabet by 13 instead of mirroring it. Both are self-inverse.
- The Caesar cipher shifts by a chosen amount and needs a separate decode step unless the shift is 13.
- Atbash is not the same as reversing text. To write a string backward, use reverse string.
Spotting and solving Atbash in a puzzle
Because the substitution never changes, common words always turn into the same ciphertext. If a puzzle text keeps repeating the same short groups, compare them with this list:
the → gsv and → zmw
you → blf is → rh
of → lu this → gsrh
A message full of gsv and zmw is almost certainly Atbash. Frequency analysis points the same way: E and T, the most common English letters, become V and G, so a ciphertext where V and G dominate is a strong hint. Paste it in and the plain text appears at once.
When you set a puzzle yourself, remember that Atbash keeps word lengths and letter patterns intact. Removing spaces, or grouping the letters in blocks of five, makes it a little harder to guess.
Privacy
The substitution runs entirely in your browser. Nothing you type is uploaded.