Encode a greeting
Hello, World!
Svool, Dliow!
H is the 8th letter and S is the 8th from the end, so they swap.
Encode or decode the Atbash cipher, which swaps each letter with its mirror in the alphabet: A with Z, B with Y, and so on. The same operation encodes and decodes.
Every ROT variant
Hello, World!
Svool, Dliow!
H is the 8th letter and S is the 8th from the end, so they swap.
wizard
draziw
A famous coincidence: the Atbash of "wizard" is "wizard" spelled backwards.
Svool, Dliow!
Hello, World!
Applying Atbash again returns the original text.
Atbash is a substitution cipher that reverses the alphabet: the first letter swaps with the last, the second with the second-to-last, and so on. In English, A becomes Z, B becomes Y and M becomes N. Because every pair simply swaps places, encoding and decoding are the same operation.
Atbash is one of the oldest known ciphers. It was first used with the Hebrew alphabet, and its name comes from the letters that swap: aleph with tav, and bet with shin (A-T-B-Sh). Scholars have pointed to it in the Book of Jeremiah, where the word "Sheshach" is read as the Atbash form of "Babel".
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Atbash | Z | Y | X | W | V | U | T | S | R | Q | P | O | N |
The table works both ways: N to Z map back to M to A. As a formula, a letter at position x (A = 0) becomes 25 − x.
| Caesar | ROT13 | Atbash | |
|---|---|---|---|
| How letters move | Shift forward by N | Shift forward by 13 | Mirror the alphabet |
| Keys | 25 | None | None |
| Self-inverse | Only for N = 13 | Yes | Yes |
Hello becomes | Khoor (N = 3) | Uryyb | Svool |
In mathematical terms, Atbash is an affine cipher with E(x) = (25x + 25) mod 26, while the Caesar cipher is the affine cipher E(x) = (x + n) mod 26.
Atbash offers no security. There is no key at all, so anyone who knows the method can read the message. It is used today in puzzles, escape rooms, games and teaching.
const atbash = (s) => s.replace(/[a-z]/gi, (c) => { const base = c <= 'Z' ? 65 : 97; return String.fromCharCode(base + 25 - (c.charCodeAt(0) - base)); }); atbash('Hello, World!'); // "Svool, Dliow!"import string table = str.maketrans( string.ascii_lowercase + string.ascii_uppercase, string.ascii_lowercase[::-1] + string.ascii_uppercase[::-1],)'Hello, World!'.translate(table) # 'Svool, Dliow!'echo 'Hello, World!' | tr 'A-Za-z' 'ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba'The decoded text is still unreadable
The message was probably encoded with a different cipher. Check ROT13 and ROT47 in the variants panel, or try the Caesar cipher solver, which tests every shift.
Digits did not change
Classic Atbash only mirrors letters. Digits, spaces and punctuation are always kept.
Accented letters such as é were not changed
This tool mirrors the 26 basic Latin letters, as standard Atbash does. Other alphabets have their own Atbash tables.
Apply Atbash again. Each letter swaps with its mirror, and swapping twice returns the original letter.
From the Hebrew alphabet: aleph swaps with tav and bet with shin, giving A-T-B-Sh.
No. ROT13 shifts every letter forward by 13 places, while Atbash mirrors the alphabet. Both are self-inverse, but they give different results: "Hello" is "Uryyb" in ROT13 and "Svool" in Atbash.
No. There is only one Atbash table for each alphabet, which is why it is easy to break.
No. Everything runs in your browser.
Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.
Tip: press Ctrl D to bookmark dev247.