🔃 Atbash Cipher
Flip the alphabet: A becomes Z, B becomes Y. The ancient Atbash cipher, the same operation encodes and decodes.
Transformed in your browser, nothing you type is uploaded.
How the atbash cipher works
Atbash reverses the alphabet: each letter is replaced by the one the same distance from the other end, so A↔Z, B↔Y, C↔X, and so on. Numbering the alphabet from 0 (A = 0, B = 1 … Z = 25), the rule is simply 25 minus the letter's position, A at 0 maps to 25 (Z), M at 12 maps to 13 (N). Because that mapping is symmetric, applying it a second time restores the original, so one operation both encodes and decodes. Digits, spaces and punctuation are left untouched. Originally a Hebrew cipher formed from the first, last, second and second-last letters (aleph-tav-bet-shin, hence "at-bash"), it's among the oldest known substitution ciphers.
Atbash appears in the Hebrew Bible and, more recently, as a puzzle in popular fiction. Like all simple substitutions it offers no security, a single fixed mapping is trivially reversed, but it's a neat, self-inverse curiosity and a common layer in cipher puzzles.
Frequently asked questions
What is the Atbash cipher?
A substitution cipher that maps each letter to its mirror in the alphabet: A↔Z, B↔Y, C↔X, through M↔N. It originated as a Hebrew cipher and is one of the oldest known.
Why is there only one button?
Because Atbash is its own inverse, reversing the alphabet twice returns you to the start. The same operation encodes and decodes.
Is Atbash secure?
No. It's a single fixed substitution with no key, reversible instantly. It's of historical and puzzle interest, not for protecting real data.
What does "HELLO" become in Atbash?
SVOOL. H↔S, E↔V, L↔O, L↔O, O↔L.
Is there a formula for the Atbash mapping?
Yes. Number the letters A = 0 through Z = 25; each letter maps to 25 minus its number. So A (0) → 25 (Z), B (1) → 24 (Y), and M (12) → 13 (N). Uppercase and lowercase are handled separately so case is preserved.
What happens to numbers and punctuation?
They pass through unchanged. Atbash only defines a mapping for the 26 letters, so digits, spaces, symbols and line breaks appear in the output exactly as you typed them.
How is Atbash different from ROT13?
Both are keyless self-inverse letter substitutions, but Atbash mirrors the alphabet (A↔Z) while ROT13 shifts it by a fixed 13 (A↔N). Atbash reverses order; ROT13 rotates position. Neither offers real security.
Does this run locally?
Yes, the mapping is applied in your browser; nothing is uploaded.