Atbash, the alphabet-reversal cipher
Atbash is a substitution cipher that maps each letter to its mirror across the alphabet: a swaps with z, b with y, c with x, and so on through m swapping with n. The name comes from the first and last letters of the Hebrew alphabet (Aleph-Tav, Bet-Shin), where the cipher originated as a way to obscure scripture.
Like ROT13, Atbash is involutive: applying it twice returns the original. There is no separate decode function. Encoding HELLO gives SVOOL; encoding SVOOL gives HELLO. The implementation here is base + 25 - (code - base), which works the same for uppercase and lowercase letters, preserving case.
Only ASCII letters a-z and A-Z are transformed. Digits, punctuation, whitespace, accented Latin characters, and non-Latin scripts pass through unchanged. Atbash is a classical / historical cipher and is not encryption: anyone who knows what Atbash is can decode it instantly by re-applying the same transform. Use it for puzzles, ARG content, and as a teaching example. For other classical ciphers, see Caesar cipher and ROT13.
How to use atbash cipher
- 1Paste or type your text into the input panel on the left.
- 2The Atbash result appears in the output panel on the right as you type.
- 3Apply Atbash again to decode (the cipher is its own inverse).
- 4Click Copy in the output header to copy the result.
- 5For other classical ciphers, try Caesar cipher or ROT13.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Alphabet-mirror substitution
Each letter maps to its 26-letter-alphabet mirror: a -> z, b -> y, m -> n, z -> a. Implementation: base + 25 - (code - base).
Self-inverse: encode and decode are the same
Applying Atbash to its own output returns the original. There is no separate decode button. This is the cipher's defining property and the reason it has a single named function.
Case preserved
Uppercase letters stay uppercase, lowercase stay lowercase. Hello becomes Svool: the capital H maps to capital S, the lowercase letters map to lowercase letters.
Non-letter characters pass through
Digits, punctuation, whitespace, accented Latin characters (é, ñ), and non-Latin scripts (Cyrillic, Greek, CJK, emoji) are untouched. Only the ASCII a-z A-Z range maps.
Not encryption
Atbash has zero key: there is nothing to guess. Anyone who knows the cipher decodes it in one step. Use it for puzzles and historical curiosity, not for anything that needs to stay secret.
Worked example
H -> S, e -> v, ... d -> w; the comma and space pass through. Apply Atbash to the output and you get the input back. For the Caesar shift family, see Caesar cipher.
Hello, world!
Svool, dliow!
Settings reference
| Behaviour | Effect on output |
|---|---|
ASCII a-z letters |
Mirrored across the alphabet. a -> z, m -> n, z -> a. |
ASCII A-Z letters |
Mirrored, case preserved. A -> Z, M -> N. |
Digits 0-9 |
Pass through unchanged. |
| Punctuation and whitespace | Pass through unchanged. |
| Accented Latin characters | é, ñ, ü pass through unchanged. Atbash is ASCII-only. |
| Non-Latin scripts | Cyrillic, Greek, CJK, emoji all pass through unchanged. |
| Self-inverse | Apply Atbash twice to get the original input back. No separate decode setting. |
FAQ
How do I decode Atbash?
How is Atbash different from ROT13?
a -> n, n -> a). Atbash mirrors across the alphabet (a -> z, z -> a). Different ciphertext, same self-inverse property.Where does the name "Atbash" come from?
A + T + B + SH: Aleph (1st letter) maps to Tav (last), Bet (2nd) maps to Shin (2nd-last), spelling out the cipher's pattern. Atbash appears in the Hebrew Bible (Jeremiah, the word "Sheshach") as a coded reference.Does Atbash affect digits or accented letters?
a-z and A-Z are mapped. Digits, punctuation, whitespace, accented characters (é, ñ), and non-Latin scripts all pass through unchanged.