UTILS.
100% in-browser
🔁

Atbash Cipher Encoder / Decoder

Substitute each letter with its mirror in the alphabet (A↔Z, B↔Y, …). This classic cipher is self-inverse, so one operation both encodes and decodes.

Atbash is self-inverse — the same operation encodes and decodes. No key needed.

— output appears here —

About this tool

The Atbash Cipher Encoder / Decoder is a free, in-browser tool for an ancient substitution cipher that originated with the Hebrew alphabet. It replaces every letter with its mirror image across the alphabet: A becomes Z, B becomes Y, C becomes X, and so on. For an uppercase character the output is chr(90 − (code − 65)); for lowercase it is chr(122 − (code − 97)). In other words the letter at index i (0–25) maps to the letter at index 25 − i.

Atbash uses no key at all, and it is an involution — applying it twice returns the original text — so the very same operation both encodes and decodes. Just type or paste your message and read the result. All processing happens locally in your browser; nothing you enter is sent anywhere.

Case is preserved and non-letters such as spaces, digits, and punctuation pass through untouched. Atbash appears throughout puzzle culture, from Bible study and the Dead Sea Scrolls to modern escape rooms and the lore of The Da Vinci Code, and it is a common first step when identifying an unknown cipher. Because it is fixed, it offers no real security — it is a puzzle and teaching cipher rather than a way to protect secrets.

Frequently asked questions

How does the Atbash cipher work?
Each letter is replaced by its mirror in the alphabet: A↔Z, B↔Y, C↔X, and so on. Formally the letter at index i (0–25) maps to index 25 − i, applied separately to the upper- and lower-case alphabets.
Why is there no encode/decode toggle?
Atbash is a self-inverse (involution): running it twice returns the original text. Encoding and decoding are the identical operation, so a single button does both — no mode switch or key is needed.
Does Atbash keep spaces and punctuation?
Yes. Only letters are transformed, and each keeps its case. Spaces, numbers, and punctuation are passed through unchanged, preserving the layout of the message.
Is Atbash secure?
No. It is a fixed substitution with no key, so anyone who recognises it can reverse it instantly. It is a historical, educational, and puzzle cipher — useful for learning and games, not for protecting real secrets.

More tools