Tools · Classical ciphers
Atbash cipher
Atbash: the alphabet read backwards. Works for Latin and Cyrillic.
Runs in your browser. Your text goes nowhere.
How to use it
Paste some text and the result appears at once. There is no separate “decrypt” mode, and none is needed: Atbash is its own inverse. Encrypt the result again (the “⇅” button moves it into the input) and the original text comes back. Case is kept; spaces, digits and punctuation are left alone.
The alphabet is detected from the text: Latin (26 letters) or Russian (33, with ё). You can choose it by hand if the text is mixed.
How Atbash works
The alphabet is folded in half: the first letter swaps with the last, the second with the second to last. In English that gives A ↔ Z, B ↔ Y, C ↔ X, all the way to M ↔ N. In the diagram below the field each pair sits in one column, and the pairs that occur in your text are highlighted. With 26 letters every letter has a partner. The Russian alphabet has an odd number of letters, 33, so its middle letter, П, turns into itself.
If you number the letters from zero, Atbash is the rule x → (N − 1) − x, where N is the size of the alphabet. So it is a special case of the affine cipher with a = b = N − 1.
Where it comes from
The name comes from the Hebrew alphabet: aleph ↔ tav, bet ↔ shin, hence “a-t-ba-sh”. A few words in the Book of Jeremiah are written this way, such as “Sheshach” for “Babel” (Babylon). More about Atbash, and about why any letter substitution gives in to frequency analysis, in the substitution lesson.
FAQ
How many keys does Atbash have?
None. There is only one Atbash, so anyone who knows about it can read it. It is more of a game than a protection.
How can I tell Atbash from other ciphers?
Run the text through this tool: if it comes out readable, that's it. The frequency analysis tool also spots Atbash automatically.
Is it safe to paste my text here?
Yes. Everything runs in your browser and nothing is sent to a server.