ToolNimba

๐Ÿ”ก Atbash Cipher Encoder and Decoder

By ToolNimba Editorial Team ยท Updated 2026-06-24

Atbash is its own inverse, so the same button both encodes and decodes. Run the output back through to get the original text.

The Atbash cipher is one of the oldest known substitution ciphers: it replaces each letter with its mirror in the alphabet, so A becomes Z, B becomes Y, and so on. Paste your text below to encode or decode it in one step. Because Atbash is its own inverse, the same action works both ways: encoding text and then encoding the result again returns the original. This tool keeps upper and lower case intact, leaves numbers, spaces and punctuation untouched, and works entirely in your browser.

What is the Atbash Cipher?

Atbash is a monoalphabetic substitution cipher, meaning every occurrence of a given letter is always replaced by the same other letter. The substitution rule is simply to reverse the alphabet: the first letter maps to the last, the second to the second-last, and so on. For the 26-letter Latin alphabet that gives A to Z, B to Y, C to X, all the way to M to N and N to M. Numerically, an uppercase letter at position c maps to position (A + Z minus c), and the same idea applies to lowercase letters within their own range. Because there is exactly one mapping and no key, the cipher is completely deterministic: the same input always produces the same output.

The name comes from the first, last, second and second-last letters of the Hebrew alphabet: Aleph, Taw, Beth, Shin (A-T-B-SH). Atbash was originally used on the 22-letter Hebrew alphabet and is widely regarded as one of the oldest ciphers in recorded history, dating to roughly 500 to 600 BCE. That places it several centuries before the Roman Caesar cipher. When the rule is applied to the modern English alphabet it becomes a tiny, fixed cipher that anyone who recognises the pattern can break by hand in moments, which is why today it is treated as a historical curiosity and a teaching example rather than a real security tool.

The most famous appearances of Atbash are in the Hebrew Bible, in the Book of Jeremiah. The prophet wrote the word Sheshach (Jeremiah 25:26 and 51:41), which decodes through Atbash to Babel, that is, Babylon, and Leb Kamai (Jeremiah 51:1), which decodes to Kasdim, the Chaldeans. Encoding the name let the message be delivered to those in the know while keeping a layer of deniability under Babylonian rule. Scholars still debate whether Jeremiah himself used the code or whether a later scribe inserted it, partly because these encoded words do not appear in the Greek Septuagint. Medieval rabbinic commentators including Rashi and Ibn Ezra explicitly identified these words as Atbash.

A defining property of Atbash is that it is an involution: applying it twice returns the original text. That is why a single button both encodes and decodes. There is nothing to remember, no key and no rotation amount, unlike Caesar or ROT13 where you must know the shift. ROT13, by contrast, shifts every letter by a fixed 13 places (A becomes N), so its mapping is a rotation rather than a mirror; the two ciphers happen to share the self-inverse trait but agree on no individual letter except by coincidence.

In terms of security, Atbash offers essentially none. With only one possible mapping and no key space to search, an attacker does not even need frequency analysis: recognising that the text is Atbash is enough to read it. Even without that recognition, the cipher preserves the frequency of every letter (E maps to V, so V becomes as common as E was), making it trivial to crack with the same statistical attacks that defeat any simple substitution cipher. Use Atbash for puzzles, escape-room clues, ciphers in games, classroom lessons on how substitution works, or light obfuscation of spoilers, and never for passwords, personal data or anything that genuinely needs to stay private.

This tool runs the cipher entirely in your browser, so nothing you type is uploaded or stored anywhere. You can encode, copy the result, feed it back in to confirm it decodes to the original, and experiment with mixed-case text and punctuation to see exactly which characters the cipher touches.

When to use it

  • Solving or creating puzzle and escape-room clues that hide a word behind a simple substitution.
  • Teaching how monoalphabetic substitution ciphers and the idea of a self-inverse mapping work.
  • Quickly checking whether a suspicious-looking string is just Atbash-encoded plain text.
  • Decoding the famous biblical Atbash words such as Sheshach or Leb Kamai to see how the cipher hides a name.
  • Lightly obscuring spoilers, answers or hints so a reader has to make a deliberate choice to decode them.
  • Demonstrating why a keyless cipher is insecure when teaching the basics of cryptography and frequency analysis.

How to use the Atbash Cipher

  1. Type or paste your text into the input box.
  2. Read the encoded (or decoded) result straight away in the result box.
  3. Use the copy button to grab the result, or "Use result as input" to run it through again.
  4. Because Atbash is its own inverse, encoding twice returns your original text, which is a quick way to confirm the result is correct.

Formula & method

For an uppercase letter with code c (A = 65 to Z = 90): result = 65 + 90 minus c. For lowercase (a = 97 to z = 122): result = 97 + 122 minus c. Non-letters are left unchanged. Equivalently, letter at position p (0 to 25) maps to position 25 minus p.

Worked examples

Encode the word "Hello".

  1. H is the 8th letter, so it maps to the 19th from the start which is S
  2. e maps to v (e is 5th, mirror is 22nd = v)
  3. l maps to o (l is 12th, mirror is 15th = o)
  4. the second l also maps to o
  5. o maps to l (mirror of the 15th is the 12th = l)

Result: "Hello" becomes "Svool"

Decode "Svool Dliow" back to plain text.

  1. Apply the same Atbash mapping, since the cipher is its own inverse
  2. S to H, v to e, o to l, o to l, l to o gives "Hello"
  3. the space is left unchanged
  4. D to W, l to o, i to r, o to l, w to d gives "World"

Result: "Svool Dliow" becomes "Hello World"

Decode the biblical word "Sheshach" using the English Atbash alphabet.

  1. Map each letter through A to Z, B to Y and so on
  2. S to H, h to s, e to v, s to h, h to s, a to z, c to x, h to s
  3. This English transliteration gives "Hsvhszxs", which is not a word
  4. The decode only works in the original Hebrew alphabet, where the same rule turns Sheshach into Babel (Babylon)

Result: In Hebrew, Sheshach decodes to Babel; in English the cipher is applied to the Latin alphabet instead

The full Atbash mapping for the English alphabet (the bottom row is its own reverse)

PlainCipher
A B C D EZ Y X W V
F G H I JU T S R Q
K L M N OP O N M L
P Q R S TK J I H G
U V W X Y ZF E D C B A

Atbash compared with other simple ciphers

CipherRuleA maps toHas a keySelf-inverse
AtbashMirror the alphabetZNoYes
ROT13Shift by 13NNo (fixed 13)Yes
CaesarShift by chosen ndepends on nYes (the shift)Only if n is 13
Reverse textReverse character orderA (unchanged)NoYes

Famous Atbash examples in the Book of Jeremiah

Encoded wordDecodes toReference
SheshachBabel (Babylon)Jeremiah 25:26 and 51:41
Leb KamaiKasdim (the Chaldeans)Jeremiah 51:1

Common mistakes to avoid

  • Treating Atbash as real encryption. Atbash has no key and only one possible mapping, so anyone who recognises the pattern can read it instantly. It is fine for puzzles and learning, but never use it to protect passwords, personal data or anything that needs to stay private.
  • Confusing Atbash with ROT13 or Caesar. ROT13 and Caesar shift every letter by a fixed amount around the alphabet. Atbash instead mirrors the alphabet, so the effective shift is different for each letter. A maps to Z under Atbash but to N under ROT13.
  • Expecting numbers and symbols to change. Atbash only acts on the 26 letters A to Z. Digits, spaces, punctuation and accented or non-Latin characters pass through untouched, which is why "Cafe 24!" keeps its "24!" exactly as typed.
  • Losing the original case. A correct Atbash keeps upper and lower case separate, so an uppercase letter stays uppercase and a lowercase letter stays lowercase. If a tool flattens everything to one case it has changed your message more than the cipher should.
  • Expecting English Atbash to decode Hebrew words. The biblical decodings like Sheshach to Babylon work on the 22-letter Hebrew alphabet. Running an English transliteration through the Latin-alphabet version of Atbash will not reproduce the Hebrew result, because the alphabets and letter order differ.
  • Assuming the result needs a separate decode mode. Because Atbash is its own inverse, there is no separate decrypt setting to find. The same transformation that encoded the text will decode it. If you cannot get back your original, the text was probably not pure Atbash.

Glossary

Atbash
A substitution cipher that replaces each letter with its mirror in the alphabet (A to Z, B to Y), named after Hebrew letters Aleph, Taw, Beth, Shin.
Substitution cipher
A cipher that replaces each letter or symbol of the plaintext with another, according to a fixed rule.
Monoalphabetic
A substitution where each plaintext letter always maps to the same single ciphertext letter throughout the message.
Involution
An operation that is its own inverse: applying it twice returns the original input, as Atbash does.
Plaintext
The original, readable message before it is encoded into ciphertext.
Ciphertext
The scrambled output produced after a cipher has been applied to the plaintext.
Frequency analysis
A code-breaking method that uses how often each letter appears; it easily defeats Atbash because the cipher preserves letter frequencies.
ROT13
A related self-inverse cipher that shifts every letter 13 places around the alphabet rather than mirroring it, so A becomes N.

Frequently asked questions

What is the Atbash cipher?

Atbash is an ancient substitution cipher that reverses the alphabet: A becomes Z, B becomes Y, C becomes X, and so on through to Z becoming A. It was originally used with the Hebrew alphabet and is one of the simplest ciphers there is, with no key to remember.

How do I decode an Atbash cipher?

You decode Atbash exactly the same way you encode it, because the cipher is its own inverse. Paste the encoded text into this tool and the decoded text appears instantly. Encoding the same text twice always returns the original.

Is Atbash the same as ROT13?

No. ROT13 shifts every letter 13 places forward, so A becomes N. Atbash mirrors the alphabet, so A becomes Z. Both happen to be their own inverse, but the mappings are completely different and the two agree on no individual letter.

Is the Atbash cipher secure?

Not at all. It has only one fixed mapping and no key, so anyone who recognises the pattern can read the message by hand. It also preserves letter frequencies, so frequency analysis breaks it easily. Use it for puzzles, games, teaching or light obfuscation, never for protecting real secrets.

Does Atbash change numbers and punctuation?

No. Atbash only transforms the 26 letters of the English alphabet. Digits, spaces, punctuation and any non-Latin characters are passed through unchanged, and upper and lower case are both preserved.

Where does the name Atbash come from?

The name is built from the first, last, second and second-to-last letters of the Hebrew alphabet: Aleph, Taw, Beth and Shin (A-T-B-SH). Those pairings describe exactly how the cipher mirrors the first letter to the last and so on.

How old is the Atbash cipher?

It is one of the oldest known ciphers, dating to roughly 500 to 600 BCE, which makes it several centuries older than the Roman Caesar cipher. Its earliest documented uses are in the Hebrew Bible.

What does Sheshach mean in the Bible?

Sheshach appears in Jeremiah 25:26 and 51:41 and decodes through Atbash, in Hebrew, to Babel, meaning Babylon. Jeremiah 51:1 uses Leb Kamai, which decodes to Kasdim, the Chaldeans. Encoding the names let the prophet name Babylon indirectly.

Can Atbash be cracked with frequency analysis?

Yes, very easily. Because each plaintext letter always maps to the same ciphertext letter, the frequency of every letter is preserved, so the same statistical attacks that break any simple substitution cipher work on Atbash. In practice it is usually solved just by recognising the pattern.

How do I encode the word HELLO in Atbash?

HELLO becomes SVOOL. H maps to S, E maps to V, each L maps to O, and O maps to L. Feed SVOOL back into the tool and it returns HELLO, demonstrating that Atbash is its own inverse.