FormatterHQ

Atbash Cipher

Swap every letter with its mirror in the alphabet (A↔Z, B↔Y, C↔X). Atbash has no key, and applying it twice returns the original text.

Input TEXT
Output TEXT
Ready.

How to use the Atbash Cipher

  1. Type or paste your text into the input box.
  2. Click Apply Atbash; the output also updates as you type.
  3. Copy the result. To decode, apply Atbash to the encoded text again.

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

PlainA B C D E F G H I J K L M
AtbashZ 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.

Frequently asked questions

How do I decode an Atbash cipher?
Paste the encoded text and click Apply Atbash. Because each letter maps to its mirror and back again, the same operation encodes and decodes.
Does Atbash have a key?
No. The substitution is fixed: A always becomes Z, B always becomes Y, and so on. That is why it offers no real security.
Does Atbash change numbers or punctuation?
No. Only the letters A to Z are mirrored, with their case preserved. Digits, spaces, punctuation and accented letters stay as they are.
Is Atbash the same as a Caesar cipher?
No. A Caesar cipher shifts letters forward by a fixed amount, while Atbash reverses the alphabet. No Caesar shift produces the Atbash mapping, although both are simple monoalphabetic substitutions.

Last updated October 3, 2026

Related tools