Skip to content
CryptographyInternals

Atbash cipher

Mirror the alphabet: A becomes Z, B becomes Y, and so on.

Family
Monoalphabetic substitution
Era
c. 600–500 BC
Keys
No key

Atbash comes from Hebrew scribal tradition and appears in the Book of Jeremiah. Its name lists the pairs it swaps: aleph–tav, bet–shin.

In the Latin alphabet it reverses the order of the letters. Because the mapping is its own mirror image, running Atbash twice gives back the original text.

Message
key = ∅no key
A
T
T
A
C
K
A
T
D
A
W
N
A
T
T
A
C
K
A
T
D
A
W
N
↓ atbash · same operation
NVVGNVZGGSVLOWYIRWTVZGNRWMRTSGYIRMTGSVWLXFNVMGHZMWGSVNZKZMWGVOOMLLMVGSVTFZIWHXSZ

01 / 10 · Inside Atbash

A message to hide

This readable text is the plaintext. Encrypting turns it into ciphertext. Classical ciphers only touch letters.

The goal: whoever intercepts the ciphertext must not get back to these letters.

Playground

Mirror your own message

Type a message and step through it: each letter is swapped with its mirror in the folded alphabet. There is no key to choose.

Your input

Result
Input
Output

Fold the alphabet in half

What happens

Write A to M on top and Z back to N underneath: each letter faces its mirror. With A = 0 … Z = 25, the mirror of x is 25 − x.

On your values

x ↔ 25 − x

A↔Z B↔Y M↔N

Why it matters

There is no key: anyone who knows the rule reads the message. A cipher whose only secret is its method is broken the day the method leaks.

Spaces, digits and punctuation pass through unchanged; accents are dropped.

Start

How it’s broken

Nothing to guess: apply the rule

Atbash has exactly one key, so the attacker’s “brute force” is a single try: run Atbash on the ciphertext.

Ciphertext
Zggzxp zg wzdm
Atbash again

How it works

  1. 1Write the alphabet forward, then write it backward underneath.
  2. 2Replace each letter with the one directly below it.
  3. 3Decryption is the same operation: A→Z and Z→A.

Formula

E(x) = D(x) = 25 − x

How it is broken

It has no key at all. Anyone who knows that Atbash was used can read the message immediately.

Like every monoalphabetic cipher, it keeps the letter frequencies of the plaintext.

Read the in-depth articleHow to Crack a Caesar Cipher and Break VigenèreA hands-on cryptanalysis tutorial: crack a Caesar cipher by brute force and frequency analysis, then break Vigenère with Kasiski to recover the key LEMON.