Skip to main content
TextReverse

Atbash Cipher Encoder & Decoder

Type a message to encode it with the Atbash cipher, or paste Atbash text to decode it. The alphabet is folded in half, so A swaps with Z, B with Y and C with X, and the same box works in both directions.

Atbash is its own inverse: running it twice gives the original back, so there is no separate decode step to get wrong. Capitals stay capitals, punctuation and numbers stay as typed, and Hebrew text is enciphered with the original Hebrew Atbash.

Try an example
Output
Example: “Hello, World!” becomesSvool, Dliow!

0 characters · 0 words · 0 lines

Example

Hello, World!Svool, Dliow!

Need the alphabet itself written backwards? Alphabet backwards

The Atbash Key

Every letter and its Atbash partner. Read it in either direction: each pair swaps both ways, so the same key encodes and decodes.

  • A becomes Z
  • B becomes Y
  • C becomes X
  • D becomes W
  • E becomes V
  • F becomes U
  • G becomes T
  • H becomes S
  • I becomes R
  • J becomes Q
  • K becomes P
  • L becomes O
  • M becomes N
  • N becomes M
  • O becomes L
  • P becomes K
  • Q becomes J
  • R becomes I
  • S becomes H
  • T becomes G
  • U becomes F
  • V becomes E
  • W becomes D
  • X becomes C
  • Y becomes B
  • Z becomes A

The Hebrew Atbash Key

The original Atbash over the 22 Hebrew letters, aleph to tav. Final forms are enciphered as their ordinary letter.

  • א becomes ת
  • ב becomes ש
  • ג becomes ר
  • ד becomes ק
  • ה becomes צ
  • ו becomes פ
  • ז becomes ע
  • ח becomes ס
  • ט becomes נ
  • י becomes מ
  • כ becomes ל
  • ל becomes כ
  • מ becomes י
  • נ becomes ט
  • ס becomes ח
  • ע becomes ז
  • פ becomes ו
  • צ becomes ה
  • ק becomes ד
  • ר becomes ג
  • ש becomes ב
  • ת becomes א

Atbash Cipher Examples

Each output below comes from the same code as the tool. Paste any output back in and you get the input again.

InputOutputWhat it shows
Hello, World!Svool, Dliow!H is the 8th letter, so it becomes S, the 8th from the end.
Svool, Dliow!Hello, World!Decoding is the same operation: the encoded text turns straight back.
Meet at the old oak at 9Nvvg zg gsv low lzp zg 9Numbers and spaces are not part of the cipher and stay as typed.
wizarddraziwSome words become their own reversal: wizard enciphers to draziw.
ABCXYZZYXCBAThe two ends of the alphabet swap places, and capitals stay capitals.
MNNMM and N, the middle pair, swap with each other. No letter stays the same.
אבגתשרHebrew Atbash: aleph swaps with tav, bet with shin, gimel with resh.

How the Atbash Cipher Works

Atbash is a substitution cipher with a fixed key: the alphabet written forwards above the alphabet written backwards.

Each letter swaps with its mirror

The first letter swaps with the last, the second with the second-to-last, and so on: A and Z, B and Y, C and X, through to M and N in the middle.

The same step decodes

Because the swaps are pairs, swapping twice puts every letter back. Encoding and decoding are the same operation, which is why this tool has one mode.

Only letters change

Spaces, punctuation, digits and emoji are not part of the alphabet, so they pass through untouched. Upper and lower case are kept.

Hebrew letters use the Hebrew alphabet

The name Atbash comes from Hebrew: aleph swaps with tav and bet with shin (A-T-B-Sh). Hebrew text is enciphered over its own 22 letters. Final forms such as final mem are enciphered as the ordinary letter, so they come back in their ordinary form.

Atbash, Backwards Text or Pig Latin?

Three easy codes compared on the same message.

Shared input: Secret message

TransformationResultReach for it when
AtbashHvxivg nvhhztvYou want every letter swapped for a different one.
Backwardsegassem terceSYou want the letters kept but in reverse order.
Pig LatinEcretsay essagemayYou want a code you can say out loud.

What Atbash Leaves Alone

The cipher is defined for one alphabet at a time, so a few kinds of character fall outside it.

Accented letters

A precomposed letter such as é is not one of the 26 and stays as typed. An accent typed as a separate mark stays on whichever letter its base letter becomes.

Other alphabets

Greek, Cyrillic and other scripts are passed through. Only A to Z and the Hebrew letters are enciphered.

Hebrew final letters

A final letter turns into an ordinary letter, so a word that ends in a final form will not come back in exactly the same spelling after two passes.

It is not secure

Atbash has a single fixed key, so anyone who recognises it can read the message. Use it for puzzles and games, never to protect anything private.

Where the Atbash Cipher Turns Up

Atbash is one of the oldest known ciphers and still one of the most common in puzzles.

The Hebrew Bible

Atbash comes from Hebrew. Scholars commonly read "Sheshach" in the Book of Jeremiah as Atbash for Babel (Babylon).

Puzzle hunts and escape rooms

Because the key never changes, Atbash is a favourite first cipher in puzzle hunts, geocaches and escape-room clues.

Classrooms

It is a simple way to introduce substitution ciphers: students can write the key out in a minute and check their own answers here.

Games and fiction

Hidden messages in games, books and shows are often written in Atbash. Paste a suspicious string to test the idea.

When to Use an Atbash Decoder

Solving a clue

Paste the ciphertext; if it turns into words, it was Atbash.

Writing a puzzle

Encode the answer to a riddle or a treasure-hunt clue.

Checking homework

Encode a sentence by hand, then compare it with the result here.

Learning the key

Use the examples to spot patterns, like M and N swapping in the middle.

Frequently Asked Questions

Related Text Tools

Browse all text tools →