The Aleppo Codex ( Hebrew: כֶּתֶר אֲרָם צוֹבָא, romanized: Keṯer ʾĂrām-Ṣōḇāʾ, lit. 'Crown of Aleppo') is a medieval bound manuscript of the Hebrew Bible. The codex was written in the city of Tiberias in the tenth century CE (circa 920) under the rule of the Abbasid Caliphate,  and was endorsed for its accuracy by Maimonides. Together with the Leningrad Codex, it contains the Ben-Asher masoretic tradition.
The codex was kept for five centuries in the Central Synagogue of Aleppo, until the synagogue was torched during anti-Jewish riots in 1947.  The fate of the codex during the subsequent decade is unclear: when it resurfaced in Israel in 1958, roughly 40% of the manuscript—including the majority of the Torah section—was missing, and only two additional leaves have been recovered since then.  The original supposition that the missing pages were destroyed in the synagogue fire has increasingly been challenged, fueling speculation that they survive in private hands.  
The Hebrew name is כֶּתֶר אֲרָם צוֹבָא Keṯer ʾĂrām-Ṣōḇāʾ, translated as "Crown of Aleppo": keter means "crown", and Aram-Zobah was a not-yet-identified biblical city in modern Syria, whose name was applied from the 11th century onward by some Rabbinical sources and Syrian Jews, to the area of Aleppo in Syria. The term keter is a translation of Arabic taj, originally Persian taj ("crown"); the codex was called "al-Taj" by locals until the modern period. In Arabic the term taj was used mostly as a stock superlative title (Muslim caliphs did not wear crowns) and applied liberally to model codices, but it lost this sense when translated into Hebrew as keter, which has only the literal sense of "crown". 
The Karaite Jewish community of Jerusalem purchased the codex about a hundred years after it was made.   When the Crusaders conquered Jerusalem in 1099, the synagogue was plundered and the codex was held for a high ransom, which was paid with money coming from Egypt, leading to the codex being transferred there.  It was preserved at the Karaite, then at the Rabbanite synagogue in Old Cairo, where it was consulted by Maimonides, who described it as a text trusted by all Jewish scholars. It is rumoured that in 1375 one of Maimonides' descendants brought it to Aleppo, Syria, leading to its present name. 
The Codex remained in Syria for nearly six hundred years. In 1947, rioters enraged by the United Nations Partition Plan for Palestine burned down the synagogue where it was kept.  The Codex disappeared, then reemerged in 1958, when it was smuggled into Israel by Syrian Jew Murad Faham, and presented to the president of the state, Yitzhak Ben-Zvi. Some time after arrival, it was found that parts of the codex had been lost. The Aleppo Codex was entrusted to the Ben-Zvi Institute and Hebrew University of Jerusalem. It is currently (2019) on display in the Shrine of the Book at the Israel Museum.
The Karaite Jewish community of Jerusalem received the book from Israel ben Simha of Basra sometime between 1040 and 1050.  It was cared for by the brothers Hizkiyahu and Joshya, Karaite religious leaders who eventually moved to Fustat (today part of Old Cairo) in 1050. The codex, however, stayed in Jerusalem until the latter part of that century.  After the Siege of Jerusalem (1099) during the First Crusade, the Crusaders held the codex and other holy works for ransom, along with Jewish survivors.   The Aleppo Codex website cites two letters in the Cairo Geniza that describe how the inhabitants of Ashkelon borrowed money from Egypt to pay for the books.  These Judeo-Arabic letters were discovered by noted Jewish historian Shelomo Dov Goitein in 1952.  The Letter of the Karaite elders of Ascalon, the more descriptive of the two, states that the money borrowed from Alexandria was used to "buy back two hundred and thirty Bible codices, a hundred other volumes, and eight Torah Scrolls."  The documents were transported to Egypt via a caravan led and funded by the prominent Alexandrian official Abu’l-Fadl Sahl b. Yūsha’ b. Sha‘yā, who was in Ascalon for his wedding in early 1100.  Judeo-Arabic inscriptions on the first page of the Codex mention the book was then "transferred to the Jerusalemite synagogue in Fustat."   The Aleppo codex website reveals how the book changed hands.
[It was] transferred [...] according to the law of redemption from imprisonment [in which it had fallen] in Jerusalem, the Holy City, may it be rebuilt and reestablished, to the congregation in Egypt of Knisat Yerushalayim, may it be built and established in the life of Israel. Blessed be he who preserves it and cursed be he who steals it, and cursed be he who sells it, and cursed be he who pawns it. It may not be sold and it may not be defiled forever. 
The Aleppo community guarded the Codex zealously for some 600 years: it was kept, together with three other Biblical manuscripts, in a special cupboard (later, an iron safe) in a basement chapel of the Central Synagogue of Aleppo, supposed to have been the Cave of Elijah. It was regarded as the community's most sacred possession: Those in trouble would pray before it, and oaths were taken by it. The community received queries from Jews around the world, who asked that various textual details be checked, correspondence which is preserved in the responsa literature, and which allows for the reconstruction of certain details in the parts that are missing today. Most importantly, in the 1850s, Shalom Shachne Yellin sent his son in law, Moses Joshua Kimchi, to Aleppo, to copy information about the Codex; Kimchi sat for weeks, and copied thousands of details about the codex into the margins of a small handwritten Bible. The existence of this Bible was known to 20th-century scholars from the book ‘Ammudé Shesh by Shemuel Shelomo Boyarski, and then the actual Bible itself was discovered by Yosef Ofer in 1989.
However, the community limited direct observation of the manuscript by outsiders, especially by scholars in modern times. Paul E. Kahle, when revising the text of the Biblia Hebraica in the 1920s, tried and failed to obtain a photographic copy. This forced him to use the Leningrad Codex instead for the third edition, which appeared in 1937.
The only modern scholar allowed to compare it with a standard printed Hebrew Bible and take notes on the differences was Umberto Cassuto, who examined it in 1943.  This secrecy made it impossible to confirm the authenticity of the Codex, and indeed Cassuto doubted that it was Maimonides' codex, though he agreed that it was tenth century.
During the 1947 Anti-Jewish riots in Aleppo, the community's ancient synagogue was burned. Later, while the Codex was in Israel, it was found that no more than 294 of the original (estimated) 487 pages survived.  
The missing leaves are a subject of fierce controversy. Originally it was thought they were destroyed by fire, but scholarly analysis has shown no evidence of fire having reached the codex itself (the dark marks on the pages are due to fungus).  Some scholars instead accuse members of the Jewish community of having torn off the missing leaves and keeping them privately hidden. Two missing portions of the manuscript—a single complete leaf from the Book of Chronicles and a fragment of a page from the Book of Exodus—were turned up from such sources in the 1980s, leaving open the possibility that even more may have survived the riots in 1947.   In particular, the 2012 book The Aleppo Codex by Matti Friedman calls attention to the fact that eyewitnesses in Aleppo who saw the Codex shortly after the fire consistently reported that it was complete or nearly complete, and then there is no account of it for more than a decade, until after it arrived in Israel and was put, in 1958, in the Ben-Zvi Institute, at which point it was as currently described; his book suggests a number of possibilities for the loss of the pages including theft in Israel. 
Documentary filmmaker Avi Dabach, great-grandson of Hacham Ezra Dabach (one of the last caretakers of the Codex when it was still in Syria), announced in December 2015 an upcoming film tracing the history of the Codex and possibly determining the fate of the missing pages. [ needs update?]
In January 1958, the Aleppo Codex was smuggled out of Syria and sent to Jerusalem to be placed in the care of the chief rabbi of the Aleppo Jews.  It was given first to Shlomo Zalman Shragai of the Jewish Agency, who later testified that the Codex was complete or nearly so at the time.  Later that year it was given to the Ben-Zvi Institute.  Still during 1958, the Jewish community of Aleppo sued the Ben-Zvi Institute for the return of the Codex, but the court ruled against them and suppressed publication of the proceedings. 
In the late 1980s, the codex was placed in the Shrine of the Book at the Israel Museum.  This finally gave scholars the chance to examine it and consider the claims that it is indeed the manuscript referred to by Maimonides. The work of Moshe Goshen-Gottstein on the few surviving pages of the Torah seems to have confirmed these claims beyond reasonable doubt. Goshen-Gottstein suggested (in the introduction to his facsimile reprint of the codex) that not only was it the oldest known masoretic Bible in a single volume, it was the first time ever that a complete Tanakh had been produced by one or two people as a unified entity in a consistent style.
Later, after the university denied him access to the codex, Mordechai Breuer began his own reconstruction of the Masoretic text on the basis of other well-known ancient manuscripts. His results matched the Aleppo Codex almost exactly. Thus today, Breuer's version is used authoritatively for the reconstruction of the missing portions of the Aleppo Codex. The Jerusalem Crown (כתר ירושלים, Keter Yerushalayim, lit. "Jerusalem Crown"), printed in Jerusalem in 2000, is a modern version of the Tanakh based on the Aleppo Codex and the work of Breuer: It uses a newly designed typeface based on the calligraphy of the Codex and is based on its page layout.[ citation needed]
Among the Jewish community of Aleppo and their descendants in the post-1947 diaspora, the belief always was that the Codex holds great magical power and that the smallest piece of it can ensure the good health and well-being of its owner.  Historically it was believed that women allowed to look at it would become pregnant, and that those in charge of the keys to the Codex vault were blessed.  On the other hand, community elders have written at the top of some pages "Sacred to Yahweh, not to be sold or defiled" and "Cursed be he who steals it, and cursed be he who sells it".  The community feared being destroyed by a plague, should they lose the Codex, and they believed that he who stole or sold the Codex would be hit by the curse. 
The consonants in the codex were copied by the scribe Shlomo ben Buya'a in Palestine circa 920. The text was then verified, vocalized, and provided with Masoretic notes by Aaron ben Moses ben Asher, the last and most prominent member of the ben Asher dynasty of grammarians from Tiberias, rivals to the ben Naphtali school. The tradition of ben Asher has become the one accepted for the Hebrew Bible.  The ben Asher vocalization is late and in many respects artificial, compared to other traditions and tendencies reaching back closer to the period of spoken Biblical Hebrew. 
The Leningrad Codex, which dates to approximately the same time as the Aleppo codex, has been claimed by Paul E. Kahle to be a product of the ben Asher scriptorium. However, its colophon says only that it was corrected from manuscripts written by ben Asher; there is no evidence that ben Asher himself ever saw it. However, the same holds true for the Aleppo Codex, which was apparently not vocalized by ben Asher himself, although a later colophon, which was added to the manuscript after his death, attributes the vocalization to him. 
The community of Damascus possessed a counterpart of the Aleppo Codex, known as the Damascus Pentateuch in academic circles and as the "Damascus Keter", or "Crown of Damascus", in traditional Jewish circles. It was also written in Israel in the tenth century, and is now kept at the National Library of Israel as "ms. Heb 5702". It is available online here . (This should not be confused with another Damascus Keter, of medieval Spanish origin.)
The Aleppo Codex was the manuscript used by Maimonides when he set down the exact rules for writing scrolls of the Torah, Hilkhot Sefer Torah ("the Laws of the Torah Scroll") in his Mishneh Torah.  This halachic ruling gave the Aleppo Codex the seal of supreme textual authority, albeit only with regard to the type of space preceding sections (petuhot and setumot) and for the manner of the writing of the songs in the Pentateuch.  "The codex which we used in these works is the codex known in Egypt, which includes 24 books, which was in Jerusalem," he wrote. David ben Solomon ibn Abi Zimra testifies to this being the same codex that was later transferred to Aleppo.[ citation needed]
The Codex, as it presents itself now in the Israel Museum where it is kept in a vault, consists of the 294 pages delivered by the Ben-Zvi Institute,   plus one full page and a section of a second one recovered subsequently.  The pages are preserved unbound and written on both sides.  Each page is parchment, 33 cm high by 26.5 cm wide (13 inches × 10.43 inches).  In particular, only the last few pages of the Torah are extant.  The ink was made of three types of gall, ground and mixed with black soot and iron sulfate. 
The manuscript has been restored by specialists of the Israel Museum, whose director declared that, given the Codex's history, it is "in remarkably excellent condition".  The purple markings on the edges of the pages were found to be mold rather than fire damage. 
When the Aleppo Codex was complete (until 1947), it followed the Tiberian textual tradition in the order of its books, similar to the Leningrad Codex, and which also matches the later tradition of Sephardi biblical manuscripts. The Torah and the Nevi'im appear in the same order found in most printed Hebrew Bibles, but the order for the books for Ketuvim differs markedly. In the Aleppo Codex, the order of the Ketuvim is Books of Chronicles, Psalms, Book of Job, Book of Proverbs, Book of Ruth, Song of Songs, Ecclesiastes, Book of Lamentations, Book of Esther, Book of Daniel, and Book of Ezra and Book of Nehemiah.
The current text is missing all of the Pentateuch to the Book of Deuteronomy 28.17; II Kings 14.21–18.13; Book of Jeremiah 29.9–31.33; 32.2–4, 9–11, 21–24; Book of Amos 8.12– Book of Micah 5.1; So 3.20–Za 9.17; II Chronicles 26.19–35.7; Book of Psalms 15.1–25.2 (MT enumeration); Song of Songs 3.11 to the end; all of Ecclesiastes, Lamentations, Esther, Daniel, and Ezra-Nehemiah. 
Several complete or partial editions of the Tanakh based on the Aleppo Codex have been published over the past three decades in Israel, some of them under the academic auspices of Israeli universities. These editions incorporate reconstructions of the missing parts of the codex based on the methodology of Mordechai Breuer or similar systems, and by taking into account all available historical testimony about the contents of the codex.
Complete Tanakh: These are complete editions of the Tanakh, usually in one volume (but sometimes also sold in three volumes, and, as noted, in more). Apart from the last, they do not include the masoretic notes of the Aleppo Codex.
Complete online Tanakh: