Tool to decrypt/encrypt with Atbash (Mirror code), a substitution cipher replacing the first letter of the alphabet with the last, the second with the penultimate etc.
Atbash Cipher - dCode
Tag(s) : Substitution Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Atbash cipher (also called the mirror cipher or reverse alphabet) is a monoalphabetic substitution cipher in which each letter is replaced by its counterpart in the alphabet; thus, A becomes Z, B becomes Y, and so on.
This cipher takes its name and origins from the ancient Hebrew alphabet.
The Atbash cipher relies on an inverted alphabet that serves as a reversible substitution key.
The Latin alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ and its symmetrical inverse (mirror) ZYXWVUTSRQPONMLKJIHGFEDCBA are mapped in a substitution table:
| Normal | ABCDEFGHIJKLMNOPQRSTUVWXYZ | 
| Reverse | ZYXWVUTSRQPONMLKJIHGFEDCBA | 
Encryption consists in replacing letters from the first with letters from the other one, with is equivalent to replace the first letter of the alphabet A with the last one Z, the second one B with the penultimate Y etc.
Example: MIRROR becomes NRIILI
Atbash decryption is identical to encryption, since the substitution (mirror) alphabet is reversible (due to the symmetry of the backwards alphabet).
Example: ZGYZHS is decrypted ATBASH
dCode offers an encoder and a decoder, but they are actually one and the same Atbash tool/converter.
An Atbash ciphertext has a coincidence index similar to an unencrypted text.
If the encryption used the classical latin alphabet, letters V,G,R,L,M appear the most frequently.
Otherwise the presence of Hebrew characters or a reference to the Dead Sea can be a clue.
The notions of mirror, reflection, opposite, axis, direction, word written in reverse (hsabta) are also clues.
The name Atbash comes from the method applied to the Hebrew alphabet:
— Aleph (first letter) ↔ Tav (last)
— Beth (second) ↔ Shin (penultimate)
The initials of these four letters (A-T-B-Sh) form the word Atbash.
The number Atbash is mentioned in the Hebrew Bible, notably in the book of Jeremiah (chapter 25, verse 26 and chapter 51, verse 41). It is used to replace names and places with their coded equivalents.
Example: The word ששך Sheshakh is the Atbash equivalent of בבל Bavel (Babylon)
There are a small number of words that have an existing Atbash equivalent in the English dictionary.
Example: GIRTH & TRIGS, GIRL & TRIO, GLOW & TOLD, HOLD & SLOW, HORN & SLIM, WILD & DROW, ZARA & AZIZ
In Hebrew, this situation is more common (notably because the alphabet has no vowels).
Atbash can be applied to any alphabet (Latin, Greek, Hebrew, Cyrillic, etc.)
Mathematically, it is a special case of the affine cipher where the multiplicative parameter is $ a = n-1 $ and the offset $ b = n-1 $ with $ n $ the size of the alphabet.
Atbash can be described as a monoalphabetic substitution using the reversed alphabet ZYXWVUTSRQPONMLKJIHGFEDCBA
The origins of the Atbash cipher date back to antiquity, probably around the 6th or 5th century BC, in Israel.
It is considered one of the earliest known cipher systems, used primarily for symbolic or religious purposes rather than for security.
dCode retains ownership of the "Atbash Cipher" source code. Any algorithm for the "Atbash Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Atbash Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Atbash Cipher" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
 Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
 
The content of the page "Atbash Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: 
In a scientific article or book, the recommended bibliographic citation is: Atbash Cipher on dCode.fr [online website], retrieved on 2025-10-31,