Atbash Cipher
Encode and decode the Atbash cipher, the ancient mirror cipher that swaps A with Z, B with Y, and so on. Because the mapping is symmetric, the same box both encrypts and decrypts. Everything runs in your browser.
Atbash is its own inverse — the same operation both encodes and decodes, so one box does both.
Enter text above to see the Atbash result here.
Atbash alphabet table
Plain
Atbash
How to use Atbash Cipher
- 1
Type or paste your text
Enter the message you want to convert. The Atbash cipher runs automatically as you type, mirroring each letter while numbers and punctuation pass through.
- 2
Read the Atbash result
Your converted text appears instantly. Because Atbash is its own inverse, the same result box works whether you are encoding plain text or decoding a coded message.
- 3
Check the alphabet table
Open the Atbash alphabet table to see the full A to Z over Z to A mapping and confirm how each letter is swapped.
- 4
Copy, download, or share
Copy the result to your clipboard, download it as a text file, or share a link that reopens the tool with your exact text ready to go.
Understanding the Atbash Cipher
What is the Atbash cipher?
The Atbash cipher is a simple substitution cipher that replaces each letter with its mirror image in the alphabet: A becomes Z, B becomes Y, C becomes X, and so on down to Z becoming A. It is one of the oldest ciphers known, originally created for the Hebrew alphabet, and its name comes from the first two letter pairs it swaps, Aleph with Taw and Beth with Shin.
Because the alphabet is simply reversed, Atbash has no key to choose and no settings to adjust. That makes it the easiest classical cipher to learn and a common sight in puzzles, escape rooms, geocaching, and beginner cryptography lessons.
How the Atbash cipher works
To encode, you write the alphabet forwards and then again backwards underneath it, lining A up with Z, B with Y, and M with N in the middle. Every letter in your message is then swapped for the letter sitting below it. Spaces, digits, and punctuation are left exactly as they are, so the word shape and length of the original message stay visible.
Atbash is its own inverse: running text through it a second time brings back the original, so the same single operation both encrypts and decrypts. There is no separate decode step and no key to remember, which is exactly what makes it so quick to use.
Worked example
Take the word HELLO. H maps to S, E maps to V, L maps to O, and O maps to L, giving the ciphertext SVOOL. Run SVOOL back through Atbash and you get HELLO again. A longer phrase behaves the same way: ATTACK AT DAWN becomes ZGGZXP ZG WZDM, with the spaces left in place so the three words remain clearly separated.
Notice that repeated letters always map to the same substitute, so the double L in HELLO becomes a double O. That fixed one-to-one mapping is what defines a monoalphabetic substitution cipher.
The Atbash table and formula
The whole cipher fits in one small table: the plain row A to Z over a cipher row Z to A. If letters are numbered from 0 to 25, with A as 0 and Z as 25, the rule is simply E(x) = 25 - x, and because applying it twice returns the original number, the very same formula decodes. The reference table below the tool shows the complete mapping at a glance.
Atbash in Hebrew and the Bible
Atbash was first used with the 22-letter Hebrew alphabet, pairing the first letter Aleph with the last letter Taw, the second letter Beth with the second-to-last Shin, and so on. Scholars have long noted apparent examples in the Hebrew Bible: in the Book of Jeremiah the name Sheshach is widely read as an Atbash encoding of Babel, meaning Babylon, and Leb Kamai is read as an encoding of Kasdim, the Chaldeans. Whether these were deliberate ciphers or wordplay is still debated, but they show the technique is at least two and a half thousand years old.
How to recognise and break Atbash
Atbash offers no real security: there is only one possible mapping, so anyone who suspects Atbash can decode a message instantly by running it through the cipher again. A useful clue is that the letter A in the plaintext always becomes Z, and short common words take on recognisable shapes, for example the word A becomes Z and the word I becomes R. Because the cipher reverses letter frequencies, the letters that are normally rare in English, such as Z and Q, suddenly appear as often as common letters do, which is a quick giveaway that a reverse-alphabet cipher is in play.
Is the Atbash cipher secure?
No. With a single fixed mapping and no key, Atbash provides no protection for anything that genuinely needs to stay secret, and it is solved the instant it is recognised. Its value today is educational and recreational: it is a perfect first cipher for teaching substitution, a fun tool for puzzles and games, and a piece of cryptographic history. For real security, modern algorithms such as AES are used instead.
Frequently asked questions
What is the Atbash cipher?
How does the Atbash cipher work?
Are encoding and decoding the same in Atbash?
Can you show an Atbash example?
What is the Atbash alphabet table?
Where does the Atbash cipher come from?
Is Atbash used in the Bible?
How do you break or recognise an Atbash cipher?
Does Atbash change numbers, spaces, or punctuation?
Is the Atbash cipher secure?
Is my text uploaded to a server?
How do I write an Atbash cipher in code?
Related tools
Keep going with these handy tools