Atbash

Atbash Cipher in the Bible: Hebrew Origins, Biblical Examples & Cryptanalysis

Discover the Atbash cipher's origins in ancient Hebrew texts and the Bible. Explore Jeremiah's coded messages, Hebrew alphabet mapping, and modern cryptanalysis.

Published March 18, 2026
14 minute read
Cryptography Guide

The Atbash cipher (Hebrew: אתבש) holds a unique place in the history of cryptography. Unlike most encryption methods that emerged from military strategy or diplomatic secrecy, the Atbash cipher was born within the sacred texts of the Hebrew Bible. Dating back to at least 600 BCE, it is one of the oldest documented encryption techniques in human civilization, and its discovery within the Book of Jeremiah reveals that the impulse to conceal meaning within language is as ancient as written prophecy itself.

This article traces the Atbash cipher from its roots in the Hebrew scribal tradition through its appearances in biblical text, its role in Jewish mysticism, and its mathematical significance in the broader history of cryptography. Whether you are a student of the Bible, a cryptography enthusiast, or simply curious about how ancient peoples hid messages in plain sight, the story of the Atbash cipher connects language, religion, and secrecy in ways that remain relevant today.

The Hebrew Alphabet and the Birth of Atbash

To understand the Atbash cipher, you must first understand the alphabet from which it takes its name. The Hebrew alphabet consists of 22 consonantal letters, running from Aleph (א) to Tav (ת). Unlike the Latin alphabet used in English, Hebrew is written and read from right to left, and its traditional form is primarily consonantal, meaning vowels were often omitted or implied by context.

The Atbash cipher works by mapping each letter of the Hebrew alphabet to its mirror counterpart. The first letter pairs with the last, the second with the second-to-last, and so on through the entire alphabet. The result is a complete reversal of the letter sequence:

PositionOriginalNameAtbashName
1אAlephתTav
2בBethשShin
3גGimelרResh
4דDalethקQof
5הHeצTsade
6וVavפPe
7זZayinעAyin
8חHetסSamekh
9טTetנNun
10יYodמMem
11כKafלLamed
12לLamedכKaf
13מMemיYod
14נNunטTet
15סSamekhחHet
16עAyinזZayin
17פPeוVav
18צTsadeהHe
19קQofדDaleth
20רReshגGimel
21שShinבBeth
22תTavאAleph

The Name "Atbash" Encodes Its Own Principle

The word "Atbash" is itself a demonstration of the cipher it describes. The name is constructed from the first two letter-pairings in the system:

  • AT (את): Aleph (א), the first letter, paired with Tav (ת), the last letter
  • BASH (בש): Beth (ב), the second letter, paired with Shin (ש), the second-to-last letter

This self-referential naming convention was a hallmark of Hebrew scribal culture, where the name of a technique often served as its own mnemonic. A scribe who knew the word "Atbash" already understood the principle: pair opposites from the ends of the alphabet and work inward.

Atbash in the Hebrew Bible: The Prophecies of Jeremiah

The most significant and well-documented appearances of the Atbash cipher occur in the Book of Jeremiah, written during one of the most turbulent periods in ancient Israelite history. Jeremiah prophesied during the late 7th and early 6th centuries BCE, a time when the Kingdom of Judah faced existential threats from the Neo-Babylonian Empire under Nebuchadnezzar II.

It is within this politically charged context that we find the Atbash cipher deployed not as a game or puzzle, but as a tool of survival.

Jeremiah 25
— The Sheshach Code

The most famous biblical use of the Atbash cipher appears in Jeremiah 25

, where the prophet lists nations that will drink from the "cup of God's wrath." Among them appears a name that puzzled readers for centuries: Sheshach (ששך).

When the Atbash transformation is applied to each Hebrew letter:

  • Shin (ש) maps to Beth (ב)
  • Shin (ש) maps to Beth (ב)
  • Kaf (ך) maps to Lamed (ל)

The result is Babel (בבל), the Hebrew name for Babylon.

This was not a coincidence or a scribal error. Jeremiah was writing during a period when openly naming Babylon as the target of divine judgment could have brought severe consequences. The Babylonian Empire controlled the region, and Judah was already a vassal state. By encoding "Babylon" as "Sheshach," Jeremiah could deliver his prophetic message to those who understood the cipher while maintaining a layer of plausible deniability to those who did not.

Jeremiah 51
— Leb Kamai and the Chaldeans

A second confirmed instance of Atbash in Jeremiah appears in chapter 51, verse 1, where the text references Leb Kamai (לב קמי). The phrase translates literally as "the heart of those who rise up against me," but applying the Atbash transformation reveals a hidden identity:

  • Lamed (ל) maps to Kaf (כ)
  • Beth (ב) maps to Shin (ש)
  • Qof (ק) maps to Daleth (ד)
  • Mem (מ) maps to Yod (י)
  • Yod (י) maps to Mem (מ)

The decoded result is Kasdim (כשדים), the Hebrew word for the Chaldeans — the ruling people of the Babylonian Empire.

What makes this example especially compelling is the dual function of the text. On the surface, "Leb Kamai" reads as a meaningful Hebrew phrase about adversaries. Beneath that surface, through Atbash, it names the Chaldeans directly. This layered meaning — a coherent surface text concealing a deeper message — represents a remarkably sophisticated use of encryption for its era.

Jeremiah 51
— A Second Sheshach

The name "Sheshach" appears again in Jeremiah 51

, reinforcing the pattern. This second occurrence helped confirm to later scholars that the usage was deliberate and systematic rather than accidental, establishing Atbash as a recognized encoding technique within biblical literature.

Why Did Biblical Authors Use Encryption?

The question of why Jeremiah and potentially other biblical authors employed the Atbash cipher has occupied scholars for centuries. Several theories have emerged:

Political protection. The most practical explanation is that encoding the names of powerful empires offered a measure of safety. Prophets who openly denounced Babylon risked imprisonment or execution. The Atbash cipher allowed the message to circulate among those who could decode it while appearing innocuous to Babylonian authorities or their local collaborators.

Literary and rhetorical device. Some scholars argue that the cipher functioned as a literary technique that added richness and depth to prophetic writing. The act of decoding mirrors the act of interpretation that all prophetic literature demands of its readers. The hidden name rewards the attentive reader and reinforces the idea that divine truth must be actively sought.

Established scribal convention. It is possible that Atbash was a widely recognized encoding method among educated scribes of the period, functioning less as a secret code and more as a conventional literary device that audiences would have understood immediately — much like an acronym or abbreviation today.

Mystical and theological significance. Within certain strands of Jewish thought, the transformation of letters carries spiritual meaning. The reversal of the alphabet could symbolize divine power to overturn the natural order, making the cipher itself a theological statement about God's ability to reverse the fortunes of nations.

Atbash in Jewish Mystical Tradition

The Atbash cipher's significance extends well beyond its biblical appearances. Within the Jewish mystical tradition known as Kabbalah, Atbash is recognized as one of several formal systems of letter permutation, collectively called tzerufim (צירופים) or letter combinations.

Kabbalistic Letter Permutation

Kabbalistic thought holds that the Hebrew letters are not merely human-made symbols but fundamental building blocks of creation. The Torah, written in Hebrew, is understood as encoding the blueprint of the universe within its letters. Systems like Atbash that transform one letter into another are therefore understood as revealing hidden connections between concepts, names, and spiritual realities.

The three most important letter-permutation systems in Kabbalah are:

  • Atbash (אתבש): The mirror reversal described throughout this article
  • Albam (אלבם): Splitting the alphabet in half and pairing corresponding letters
  • Atbah (אתבה): A more complex system pairing letters based on numerical values

Each system produces different transformations and is believed to uncover different layers of meaning within sacred texts. Of these, Atbash is the oldest and most widely attested in biblical literature.

Talmudic and Midrashic References

The ancient rabbinical commentaries — the Talmud and Midrash — acknowledge the existence of Atbash in the biblical text. Early commentators recognized that "Sheshach" was a cipher for "Babel" and discussed the implications this held for interpreting prophetic literature. These discussions demonstrate that knowledge of the Atbash cipher was preserved continuously within Jewish scholarly tradition from the biblical period through late antiquity and into the medieval era.

The midrashic tradition also explored additional possible instances of Atbash in biblical texts beyond the confirmed Jeremiah examples. While many of these proposed instances remain debated among scholars, they reflect a deep awareness that ancient Hebrew authors employed sophisticated literary and cryptographic techniques.

Mathematical Foundation of the Atbash Cipher

From a modern cryptographic perspective, the Atbash cipher can be understood as a specific instance of the Affine cipher, which is itself a generalization of the Caesar cipher.

The Affine Cipher Connection

The standard affine cipher encrypts a letter at position x using the formula:

E(x) = (ax + b) mod m

Where m is the size of the alphabet, a is a multiplier, and b is a shift value.

The Atbash cipher corresponds to the special case where both a and b equal m - 1. For the 26-letter English alphabet:

E(x) = (25x + 25) mod 26

For the 22-letter Hebrew alphabet:

E(x) = (21x + 21) mod 22

In both cases, the formula produces the mirror reversal that defines Atbash.

The Self-Inverse Property

One of the Atbash cipher's most elegant mathematical properties is that it is self-inverse: applying the cipher twice returns the original text. In other words, the encryption process and the decryption process are identical. This property arises naturally from the mirror structure — if A maps to Z, then Z maps back to A.

For the Hebrew alphabet, this meant that scribes needed to learn only one procedure. There was no separate decoding step, no key to remember or transmit. The simplicity of this system made it practical in an era when written instructions for cryptographic methods could themselves be intercepted and read.

Comparison with Other Ancient Ciphers

The Atbash cipher predates the Caesar cipher by several centuries. While Julius Caesar used his shift cipher for military communications around 50 BCE, the Atbash cipher was already in use by 600 BCE or earlier. This makes it one of the oldest known encryption methods in the world.

FeatureAtbash CipherCaesar Cipher
Origin~600 BCE, Hebrew scribes~50 BCE, Roman military
Key requiredNoneShift value (1-25)
VariationsSingle fixed mapping25 possible shifts
Self-inverseYesOnly ROT13 (shift 13)
Primary useReligious/prophetic textsMilitary communications

Despite its simplicity, the Atbash cipher's fixed nature — having no variable key — means it offers no cryptographic security by modern standards. Anyone who knows the method can immediately decode any Atbash-encrypted message. However, in the ancient world, where literacy itself was rare and knowledge of encoding systems was rarer still, this simplicity was not a significant weakness.

Archaeological Evidence and Scholarly Debate

The Dead Sea Scrolls

The discovery of the Dead Sea Scrolls beginning in 1947 opened new avenues for studying ancient Hebrew writing practices, including cryptographic techniques. Some scholars have examined these texts — dating from the 3rd century BCE to the 1st century CE — for potential instances of Atbash and other letter-permutation systems.

While the Dead Sea Scrolls have not yielded dramatic new Atbash examples beyond what was already known from the biblical text, they have provided valuable context about the scribal culture in which such techniques were practiced. The scrolls reveal a community deeply invested in textual interpretation, hidden meanings, and the belief that sacred texts contained layers of significance accessible only through careful analysis.

Ancient Inscriptions and Epigraphy

Archaeological discoveries in the ancient Near East continue to inform our understanding of early writing practices. Inscriptions found throughout the Levant, Mesopotamia, and Egypt reveal a broader culture of encoded communication that extended beyond the Hebrew tradition. While direct archaeological evidence of Atbash usage outside biblical texts remains limited, the practice of concealing names and messages within official texts appears across multiple ancient cultures.

Ongoing Scholarly Discussion

The identification of Atbash in Jeremiah is widely accepted among biblical scholars, but debates continue on several fronts:

  • Scope of usage: Were there more instances of Atbash in the Hebrew Bible that have not yet been recognized? Some scholars have proposed additional examples in other biblical books, though none have achieved the same level of consensus as the Jeremiah passages.
  • Authorial intent: Did the original author (Jeremiah or his scribe Baruch) expect all readers to decode the cipher, or was it intended for a specific audience? The answer to this question affects how we understand the function of cryptography in ancient literary culture.
  • Transmission history: How faithfully was the cipher preserved through centuries of manuscript copying? Later scribes who did not understand the cipher might have introduced errors, while those who did understand it might have added their own encoded passages.

Cultural Spread Beyond the Hebrew World

While the Atbash cipher originated in the Hebrew tradition, the principle of alphabet reversal spread across the ancient Mediterranean world and beyond.

Greek and Roman Adoption

Ancient Greek and Roman writers were aware of various substitution ciphers, and the principle of alphabet reversal appears in different forms across classical literature. The Greeks, who had extensive contact with Semitic cultures through trade and colonization, may have been directly influenced by Hebrew cryptographic practices.

Medieval Manuscripts

During the medieval period, knowledge of the Atbash cipher was preserved primarily within Jewish scholarly communities. Christian scholars who studied Hebrew — particularly during the Renaissance — encountered Atbash through their engagement with rabbinic commentaries on the Bible. This cross-cultural transmission helped establish the Atbash cipher as a recognized concept in European intellectual history.

Secret Societies and Esoteric Groups

Various esoteric and fraternal organizations throughout history have incorporated Hebrew letter-permutation systems, including Atbash, into their symbolic practices. The Kabbalistic associations of the cipher made it attractive to groups interested in hidden knowledge and mystical traditions, from medieval alchemists to early modern Rosicrucians.

Implementing the Atbash Cipher in Code

For those who want to explore the Atbash cipher hands-on, here are implementations in two popular programming languages. These demonstrate how the ancient mirror principle translates directly into modern code.

Python Implementation

Python26 lines
Highlighting code...
825 chars

Hebrew Atbash in Python

Python13 lines
Highlighting code...

JavaScript Implementation

JavaScript14 lines
Highlighting code...

Security Analysis: Ancient Strength, Modern Weakness

Why Atbash Worked in the Ancient World

The Atbash cipher provided meaningful security in its original context for several reasons that had less to do with cryptographic strength and more to do with the information environment of the ancient Near East:

  • Limited literacy: In ancient Judah, the ability to read and write was confined to a small educated class. Among those who could read, knowledge of specific encoding techniques was even more restricted.
  • No systematic cryptanalysis: The formal study of code-breaking did not exist in the ancient world. Without tools like frequency analysis (which would not be developed until the 9th century CE by Arab scholars), there was no systematic method for attacking substitution ciphers.
  • Sacred context: Messages encoded within religious texts benefited from an additional layer of protection — the assumption that sacred writings contained only theological content, not political commentary.

Why Atbash Fails by Modern Standards

By the standards of modern cryptography, the Atbash cipher offers no security whatsoever:

  • No key: The cipher has no variable element. Once you know the method, you can decode any message instantly.
  • Vulnerability to frequency analysis: In any substitution cipher that maps each letter to exactly one other letter, the frequency distribution of the original language is preserved in the ciphertext. The most common letters in Hebrew or English remain the most common after encryption, making the cipher trivially breakable.
  • Single fixed transformation: Unlike the Vigenere cipher or modern encryption algorithms, Atbash offers only one possible mapping. There are no alternative keys to try.

Despite these weaknesses, the Atbash cipher retains significant educational value. It serves as an ideal introduction to cryptographic concepts — substitution, self-inverse functions, the relationship between plaintext and ciphertext — without requiring any mathematical prerequisites.

The Enduring Legacy of the Atbash Cipher

The Atbash cipher's journey from the scrolls of ancient Hebrew prophets to modern cryptography classrooms spans more than 2,500 years. Its legacy can be measured in several dimensions:

As a historical artifact, it represents one of humanity's earliest recorded attempts to systematically conceal information within text. The Jeremiah passages demonstrate that cryptography was not invented for warfare alone but emerged independently within religious and literary traditions.

As a mathematical object, it connects to the broader family of affine ciphers and illustrates fundamental concepts like modular arithmetic, self-inverse functions, and the relationship between encryption and decryption.

As a cultural tradition, it has been preserved and transmitted across millennia through Jewish scholarship, biblical commentary, and mystical practice. Few human inventions of any kind can claim such continuity.

As an educational tool, it provides the simplest possible entry point into the study of cryptography — a cipher that requires no key, no complex mathematics, and no specialized tools, yet illustrates the core principles that underlie all encryption systems.

The next time you encounter the name "Sheshach" in the Book of Jeremiah, you will know that you are looking at one of the oldest encrypted messages in recorded history — and that the key to reading it was hidden in the name of the cipher itself.

Try our free Atbash Cipher decoder to encode and decode messages using the reverse alphabet. You can also explore the Hebrew Atbash tool to work with the original Hebrew alphabet, or use the Atbash decoder to analyze encrypted text.

About This Article

This article is part of our comprehensive atbash cipher tutorial series. Learn more about classical cryptography and explore our interactive cipher tools.

Try Atbash Cipher Cipher Tool

Put your knowledge into practice with our interactive atbash cipherencryption and decryption tool.

Try Atbash Cipher Tool