ToolNimba Browse

🔡 Atbash Cipher Encoder and Decoder

By ToolNimba Editorial Team · Updated 2026-06-19

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.

The name comes from the first, last, second and second-last letters of the Hebrew alphabet: Aleph, Taw, Beth, Shin (A-T-B-SH). It was originally used on the Hebrew alphabet and appears in some readings of biblical texts. Applied to the modern English alphabet it is a tiny, fixed cipher with no key, which makes it more of a historical curiosity and a teaching example than a way to keep secrets. Anyone who recognises the pattern can decode it by hand in moments.

A defining property of Atbash is that it is an involution: applying it twice returns the original text. That is why a single button encodes and decodes. It also means there is nothing to remember, no key, no rotation amount, unlike Caesar or ROT13 where you must know the shift. The trade-off is zero real security: with only one possible mapping, Atbash offers no protection against anyone trying to read the message, so use it for puzzles, ciphers in games, learning how substitution works, or light obfuscation, never for genuine secrets.

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.
  • Lightly obscuring spoilers or answers so a reader has to make a deliberate choice to decode them.

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.

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"

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

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 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.

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.

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 only a few letters coincide.

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. Use it for puzzles, games, teaching or light obfuscation, never for protecting real secrets or sensitive data.

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.