Cipher Utility

Atbash Cipher

C-06

Swap A with Z, B with Y and so on. The same step encodes and decodes. Runs in your browser; nothing is sent anywhere.

How to use Atbash by hand

  1. Write the alphabet A to Z.
  2. Write it backwards underneath.
  3. Swap each letter for the one in the other row.
  4. Keep numbers and punctuation.
  5. Do the same to decode.

Worked example

Swap each letter of HELLO:

H→S  E→V  L→O  O→L

HELLO = SVOOL

Further reading

Cipher Utility reference card Catalog no. C-06

What the Atbash cipher is

Atbash is a substitution cipher that mirrors the alphabet. The first letter swaps with the last, the second with the second to last, and so on: A becomes Z, B becomes Y, M becomes N. Numbers, spaces and punctuation stay the same.

Applying the swap twice gives back the original, so the same step encodes and decodes. There is no key to choose.

Meet me at midnight Nvvg nv zg nrwmrtsg

Atbash alphabet

LetterABCDEFGHIJKLMNOPQRSTUVWXYZ
AtbashZYXWVUTSRQPONMLKJIHGFEDCBA

Where Atbash comes from

Atbash was first used with the Hebrew alphabet, and its name spells out the first pairs: aleph with tav, bet with shin. It appears in the Book of Jeremiah, where Sheshach stands for Babel (Babylon) in the Atbash swap. Our article on Atbash and biblical cryptography tells the story in more detail.

The same idea works for any alphabet. This tool uses the 26 letters of the English alphabet and keeps upper and lower case as they were.

How to recognize Atbash

Atbash keeps word lengths and spaces, and every letter always becomes the same other letter. Common English words give it away: THE becomes GSV and AND becomes ZMW. Because there is only one possible key, checking for Atbash takes one click. The cipher decoder tries Atbash together with ROT13, every Caesar shift and common encodings.

Questions about Atbash

How do I decode an Atbash cipher?

Paste the text into the box above. Atbash is its own inverse, so the same swap that hides a message also reveals it. By hand, write the alphabet forwards with the alphabet backwards underneath and swap each letter for the one in the other row.

Does Atbash have a key?

No. The alphabet is always simply reversed, so there is only one way to encode a message. That also means anyone who recognizes it can read it.

Where does the name Atbash come from?

From the Hebrew alphabet. It joins the first letter (aleph) with the last (tav) and the second (bet) with the second to last (shin): a-t-b-sh.

What is the difference between Atbash and ROT13?

Both have no key and decode themselves. ROT13 moves every letter 13 places forward, so A becomes N. Atbash mirrors the alphabet, so A becomes Z. The ROT13 tool handles the other one.

Is my text sent to a server?

No. The swap runs in your browser with JavaScript, and nothing you type or paste leaves your device.