QuirkText

Atbash Cipher

Atbash swaps every letter for its mirror in the alphabet: A becomes Z, B becomes Y, and so on. Type or paste text below and the result updates as you go.

Result
PlainABCDEFGHIJKLMNOPQRSTUVWXYZ
AtbashZYXWVUTSRQPONMLKJIHGFEDCBA

Runs entirely in your browser. Your data never leaves your device.

How to use it

  1. Type or paste your message into the text box. It starts with "Hello, World!" so you can see the output right away.
  2. Read the result underneath. Letters are mirrored, and case, spaces, digits and punctuation stay as they are.
  3. To decode, paste the encoded text into the same box. Atbash is its own reverse, so there is no mode switch.
  4. Press Copy result, or check a single letter against the Plain and Atbash rows of the table below the result.

How the Atbash cipher works

Atbash is a monoalphabetic substitution cipher. Write the alphabet forward on one line and backward on the line below it. Each letter in the top row is replaced by the letter beneath it. A becomes Z, B becomes Y, C becomes X, and the pattern ends with M and N swapping places.

There is no key to choose. That makes it the simplest cipher on this site, and also the easiest to break. If you know a message is Atbash, you already know everything needed to read it.

The Atbash alphabet

PlainABCDEFGHIJKLM
AtbashZYXWVUTSRQPON

The second half of the alphabet is the same table read backward: N maps to M, O to L, and Z to A. Because every pair swaps, the cipher decodes itself.

Atbash cipher formula

Number the letters from A=0 to Z=25. The Atbash value of a letter at position x is:

atbash(x) = 25 - x

Apply it twice and you get 25 - (25 - x) = x, the original letter. In the language of the affine cipher, Atbash uses a multiplier of -1 and a shift of 25, all modulo 26.

Worked example: encoding "Hello, World!"

Take the message one letter at a time.

  1. H is position 7. 25 - 7 = 18, which is S.
  2. e is position 4. 25 - 4 = 21, which is v.
  3. l is position 11. 25 - 11 = 14, which is o. The second l gives o again.
  4. o is position 14. 25 - 14 = 11, which is l.
  5. The comma and the space are not letters, so they stay.
  6. W is 22, so 3, which is D. Then o becomes l, r (17) becomes i (8), l becomes o, and d (3) becomes w (22).

The result is Svool, Dliow! Paste it back into the tool and you get "Hello, World!" again.

Atbash decoder: same step in both directions

People search for an Atbash decoder as if it were a separate tool. It is not. The decoder is the encoder. Paste coded text into the box and the output is the plain message. This also means you can check your own work by running a result through the tool a second time.

The tool mirrors A-Z and a-z and keeps the original case. Digits, spaces, symbols and accented letters are left alone, so "Café 2026" keeps its "é" and its digits.

Common words in Atbash

PlainAtbash
HelloSvool
AtbashZgyzhs
secrethvxivg
catxzg
dogwlt
loveolev

Notice "cat" becomes "xzg". Rare letters like X and Z in an English-looking puzzle are often a sign of Atbash, because common letters such as C and A land on those rare ones.

Atbash versus ROT13 and Caesar

All three are substitution ciphers on a 26-letter alphabet, but they work differently.

  • Atbash reverses the alphabet. It has one fixed mapping.
  • ROT13 shifts every letter 13 places. It also has one fixed mapping, and it also undoes itself.
  • The Caesar cipher shifts by any number from 1 to 25, so a message has 25 possible shifts to try.

Run "Hello" through each and you get Svool (Atbash) and Uryyb (ROT13). A Caesar shift of 3 gives Khoor. If you want a cipher with a real key, try the Vigenere cipher, which changes the shift for each letter.

Is Atbash secure? Limits and common mistakes

Atbash gives no real protection. There is only one possible mapping, and it keeps letter frequencies intact: the most common letter in the message becomes the mirror of the most common letter in English. A ciphertext with a lot of V is probably full of E.

A few mistakes come up often:

  • Expecting digits to change. Numbers are not part of the 26-letter mirror.
  • Mirroring the wrong alphabet. On a 22-letter Hebrew alphabet the pairs are different, and this tool only handles the Latin letters A-Z.
  • Treating it as encryption. It is an obfuscation puzzle. Do not use it for passwords or private notes.

A short history of Atbash

Atbash first appeared with the Hebrew alphabet, which has 22 letters. The name comes from the pairing: aleph with taw (the first and last letters), bet with shin (the second and second to last). Aleph, taw, bet, shin gives "Atbash".

The best known example is in the Book of Jeremiah. In Jeremiah 25:26 and 51:41 the word "Sheshach" appears. Run the Hebrew spelling of Babylon through Atbash and you get Sheshach, so scholars read it as a coded name for Babylon. The same technique is linked to "Lev-kamai" in Jeremiah 51:1, read as Chaldeans. Dates for these uses are not firmly established, so treat any exact year you see online with caution.

Today Atbash turns up mostly in puzzle hunts, escape rooms and beginner cryptography classes, often next to the Caesar cipher and ROT13.

Related tools

If Atbash is only one step of a puzzle, the Morse code translator and the binary code translator cover two other common encodings.

Sources

Checked October 2026.

Frequently asked questions

What is the Atbash cipher?

Atbash is a substitution cipher that maps the first letter of the alphabet to the last, the second to the second to last, and so on. In English that means A to Z, B to Y and M to N. It was first used with the Hebrew alphabet.

How do I decode Atbash?

Run the same mirror again. Atbash has no key and no direction, so decoding is identical to encoding. Paste the coded text into the box above and read the result. For example, "Svool" turns back into "Hello".

What is the Atbash formula?

Number the letters A=0 to Z=25. The mirror of a letter at position x is 25 - x. So H (7) becomes 18, which is S. It is the same as the affine cipher with a multiplier of -1 and a shift of 25.

Is Atbash the same as ROT13?

No. ROT13 shifts each letter 13 places forward, so Hello becomes Uryyb. Atbash reverses the alphabet, so Hello becomes Svool. Both undo themselves when applied twice, which is why people mix them up.

Is the Atbash cipher secure?

No. It has exactly one possible key, so anyone who suspects Atbash can decode a message in seconds. Treat it as a puzzle or a teaching example, not as protection for real data.

Why is it called Atbash?

The name comes from the Hebrew letters aleph, taw, bet and shin: the first, the last, the second and the second to last. Pairing them is exactly how the cipher builds its mirror alphabet.

Does this tool change numbers and punctuation?

No. Only the 26 letters A to Z are mirrored, in upper and lower case. Digits, spaces, accented letters and symbols pass through unchanged.