Christian views on magic vary widely among denominations and among individuals. Many Christians actively condemn magic as satanic, holding that it opens the way for demonic possession. Some Christians simply view it as entertainment. Conversely, some branches of esoteric Christianity actively engage in magical practices.
Main article: Witchcraft and divination in the Hebrew Bible
There are several references to witchcraft in the Bible that strongly condemn such practices. For example, Deuteronomy 18:11–12 condemns anyone who "casts spells, or who is a medium or spiritist or who consults the dead. Anyone who does these things is detestable to the Lord, and because of these detestable practices the Lord your God will drive out those nations before you", and Exodus 22:18 states "Do not allow a sorceress to live" (or in the King James Bible "thou shalt not suffer a witch to live"). It has also been suggested that the word "witch" (Heb. מְכַשֵּׁפָ֖ה məḵaššêp̄āh) might be a mistranslation of "poisoner."
Others point to a primitive idealist belief in a relation between bewitching and coveting, reflected in the occasional translation of the Tenth Commandment as 'Thou shalt not covet'. This may suggest that the prohibition related specifically to sorcery or the casting of spells to unnaturally possess something.
Some adherents of near-east religions acted as mediums, channeling messages from the dead or from a familiar spirit. The Bible sometimes is translated as referring to "necromancer" and "necromancy" (Deuteronomy 18:11). However, some lexicographers, including James Strong and Spiros Zodhiates, disagree. These scholars say that the Hebrew word kashaph (כשפ), used in Exodus 22:18 and 5 other places in the Tanakh comes from a root meaning "to whisper". Strong, therefore, concludes that the word means "to whisper a spell, i.e. to incant or practice magic". The Contemporary English Version translates Deuteronomy 18:11 as referring to "any kind of magic".
At the very least, older biblical prohibitions included those against 'sorcery' to obtain something unnaturally; 'necromancy' as the practice of magic or divination through demons or the dead, and any forms of malevolent 'bewitchery'.
See also: Early Christianity
The Apostle Paul's Epistle to the Galatians includes sorcery in a list of "works of the flesh". This disapproval is echoed in the Didache, a very early book of church discipline which dates from the mid-late first century.
See also: Witch trials in the early modern period
During the Early Middle Ages, the Christian Churches did not conduct witch trials. The Germanic Council of Paderborn in 785 explicitly outlawed the very belief in witches, and the Holy Roman Emperor Charlemagne later confirmed the law. Among Eastern Orthodox Christians concentrated in the Byzantine Empire, belief in witchcraft was widely regarded as deisidaimonia—superstition—and by the 9th and 10th centuries in the Latin Christian West, belief in witchcraft had begun to be seen as heresy.
Christian perspectives began to change with the influential writings of the mystic poet Dante Alighieri and scholastic philosopher Thomas Aquinas, both of whom believed in astrology, whilst condemning sorcery as moral perversion. Dante also condemned then-current forms of alchemy and divination, whilst Aquinas had a more nuanced and sympathetic view. 
Towards the end of the Middle Ages and the beginning of the early modern period (post-Reformation), belief in witchcraft became more popular and witches were seen as directly in league with the Devil. This marked the beginning of a period of witch hunts among early Protestants which lasted about 200 years, and in some countries, particularly in North-Western Europe, tens of thousands of people were accused of witchcraft and sentenced to death.
The Inquisition within the Roman Catholic Church had conducted trials against supposed witches in the 13th century, but these trials were to punish heresy, of which belief in witchcraft was merely one variety. Inquisitorial courts only became systematically involved in the witch-hunt during the 15th century: in the case of the Madonna Oriente, the Inquisition of Milan was not sure what to do with two women who in 1384 and in 1390 confessed to have participated in a type of white magic.
Not all Inquisitorial courts acknowledged witchcraft. For example, in 1610 as the result of a witch-hunting craze the Suprema (the ruling council of the Spanish Inquisition) gave everybody an Edict of Grace (during which confessing witches were not to be punished) and put the only dissenting inquisitor, Alonso de Salazar Frías, in charge of the subsequent investigation. The results of Salazar's investigation was that the Spanish Inquisition did not bother witches ever again though they still went after heretics and Crypto-Jews.
Martin Luther shared some of the views about witchcraft that were common in his time. When interpreting Exodus 22:18, he stated that, with the help of the devil, witches could steal milk merely by thinking of a cow. In his Small Catechism, he taught that witchcraft was a sin against the second commandment and prescribed the Biblical penalty for it in a "table talk":
On 25 August 1538 there was much discussion about witches and sorceresses who poisoned chicken eggs in the nests, or poisoned milk and butter. Doctor Luther said: "One should show no mercy to these [women]; I would burn them myself, for we read in the Law that the priests were the ones to begin the stoning of criminals."
Luther's view of practitioners of magic as quasi-demons was at odds with the Catholic view that emphasized choice and repentance. He also argued that one of the most serious perversions wrought by magic was the threatened degeneration of traditional female roles in the family.
In the era of the Inquisition and anti-witchcraft sentiment, there was a more acceptable form of "purely natural" occult and pagan study, the study of "natural" phenomena in general with no evil or irreligious intent whatsoever. 
Renaissance humanism (15th and 16th century) saw a resurgence in hermeticism and Neo-Platonic varieties of ceremonial magic. Both bourgeoisie and nobility of that era showed great fascination with these arts, which exerted an exotic charm by their ascription to Arabic, Jewish, Romani, and Egyptian sources. There was great uncertainty in distinguishing practices of vain superstition, blasphemous occultism, and perfectly sound scholarly knowledge or pious ritual. The people during this time found that the existence of magic was something that could answer the questions that they could not explain through science. To them it was suggesting that while science may explain reason, magic could explain "unreason".
Marsilio Ficino advocated the existence of spiritual beings and spirits in general, though many such theories ran counter to the ideas of the later Age of Enlightenment, and were treated with hostility by the Roman Catholic Church. Ficino however theorised a "purely natural" magic that did not require the invocation of spirits, malevolent or malicious. Benedictine abbot Johannes Trithemius reportedly created incantations of his own related to beneficial communication with spirits. His works, including the Steganographia, were immediately placed on the Index Librorum Prohibitorum. However these works were later revealed to be concerned with cryptography and steganography, and the "magical" formulae were cover texts for cryptographic content. Behind their methods however, is an underlying theological motive for their contrivance. The preface to the Polygraphia establishes the everyday practicability of Trithemian cryptography as a "secular consequent of the ability of a soul specially empowered by God to reach, by magical means, from earth to Heaven".
Heinrich Cornelius Agrippa (1486–1535), a German magician, occult writer, theologian, astrologer, and alchemist, wrote the influential Three Books of Occult Philosophy, incorporating Kabbalah in its theory and practice of Western magic. It contributed strongly to the Renaissance view of ritual magic's relationship with Christianity. Giambattista della Porta expanded on many of these ideas in his Magia Naturalis. Giovanni Pico della Mirandola promoted a syncretic worldview combining Platonism, Neoplatonism, Aristotelianism, Hermeticism and Kabbalah.
Pico's Hermetic syncretism was further developed by Athanasius Kircher, a Jesuit priest, hermeticist and polymath, who wrote extensively on the subject in 1652, bringing further elements such as Orphism and Egyptian mythology to the mix. Lutheran Bishop James Heiser recently evaluated the writings of Marsilio Ficino and Giovanni Pico della Mirandola as an attempted "Hermetic Reformation".
See also: Enochian magic
John Dee was an intense Christian, but his religiosity was influenced by Hermetic and Renaissance Neo-Platonism and pervasive Pythagorean doctrines. From Hermeticism he drew a belief that man had the potential for divine power that could be exercised through mathematics. He immersed himself in magic, astrology and Hermetic philosophy. Much effort in his last 30 years went into trying to commune with angels, so as to learn the universal language of creation and achieve a pre-apocalyptic unity of mankind. His goal was to help bring forth a unified world religion through the healing of the breach of the Roman Catholic and Protestant churches and the recapture of the pure theology of the ancients.
During the Age of Enlightenment, belief in the powers of witches and sorcerers to harm began to die out in the West. But the reasons for disbelief differed from those of early Christians. For the early Christians the reason was theological—that Christ had already defeated the powers of evil. For the post-Enlightenment Christians in West and North Europe, the disbelief was based on a belief in rationalism and empiricism.
It was at this time, however, that Western Christianity began expanding to parts of Africa and Asia where premodern worldviews still held sway, and where belief in the power of witches and sorcerers to harm was, if anything, stronger than it had been in Northern Europe. Many African Independent Churches developed their own responses to witchcraft and sorcery.
The situation was further complicated by the rise of new religious movements that considered witchcraft to be a religion. These perspectives do not claim that witches actually consciously enter into a pact with Satan because Satan is not normally believed to exist in Wicca or other modern neo-pagan witchcraft practices.
Several Christian groups continue to believe in witchcraft and view it as a negative force. Much of the criticism originates among Evangelical Christian groups, especially those which have a fundamentalist tendency, which believe that witchcraft is a danger to children. The 2006 documentary Jesus Camp, which depicts the life of young children attending Becky Fischer's summer camp, shows Fischer condemning the Harry Potter novels and telling the students that "Warlocks are enemies of God" (see also Religious debates over the Harry Potter series). While Fischer's summer camp has sometimes been incorrectly identified as Pentecostal, Fischer is most closely associated with the neo-Pentecostal movement known as the New Apostolic Reformation. NAR prophet Lou Engle, who serves in the NAR apostolic group The Apostolic Council of Prophetic Elders, makes an extended appearance in Jesus Camp.
Among Christian tendencies, the NAR is especially aggressive in efforts to counter alleged acts of witchcraft; the NAR's globally distributed "Transformations" pseudo-documentaries by filmmaker George Otis, Jr. show charismatic Christians creating mini-utopias by driving off "territorial spirits" and by banishing or even killing accused witches. During the 2008 United States presidential election, footage surfaced from a 2005 church ceremony in which a NAR apostle, Kenyan bishop Thomas Muthee laid hands on Sarah Palin and called upon God to protect her from "every form of witchcraft".
In 2009, Pope Benedict XVI denounced belief in witchcraft during a visit to Angola.
Modern Christian views vary as to whether witchcraft is a general term for communion with evil, or a specific form of religious system and practice. Christians[specify] often espouse the idea that Satan and evil are real while condemning accusations of witchcraft found throughout history as dubious.
Magic in literature, while condemned by some Christians, is often viewed by Christians as non-evil. The key distinction would be between real-life magic and pretend magic. This view holds that in real life, the practice of supernatural abilities (i.e. magic) must have a supernatural power source or origin, which would be either holy or evil. Thus born of Holy Spirit or of demons. (See Spiritual gift and Christian demonology for details on these teachings.) Thus, magic in the Biblical context would be viewed as only an act of evil, whereas in literature, pretend magic is a morally neutral tool available to conduct both good and bad behaviors.
In literature, magical abilities have many different power sources. Technological ability (science) can appear as magic. Often, wielding magic is accomplished by imposing one's will by concentration and/or use of devices to control an external magical force. This explanation is offered for the Force in Star Wars, magic in Dungeons and Dragons, and magic in The Chronicles of Narnia and The Lord of the Rings.
The latter two works are by notable Christians, C. S. Lewis and J. R. R. Tolkien, respectively. In the first book in The Chronicles of Narnia, The Magician's Nephew, Lewis specifically explains that magic is a power readily available in some other worlds, less so on Earth. The Empress Jadis (later, the White Witch) was tempted to use magic for selfish reasons to retain control of her world Charn, which ultimately led to the destruction of life there. Lewis related questions of the morality of magic to the same category as the morality of technology, including whether it is real, represents an 'unhealthy interest', or contravenes the basic divine plan for our universe.
Tolkien, a devout Catholic, had strict rules imposed by the ruling powers, angels who had assumed the 'raiment of the earth', for the use of magic by their servants. These included a general discouragement of magic in all but exceptional circumstances, and also prohibitions against use of magic to control others, to set the self up as a political power, or to create a world that violates the natural order. He did however allow his wizard character to entertain children with magical fireworks. 
From the Middle Ages, many Hermeticists combined Christianity with occult practices (mostly alchemy). These Christo-pagan perspectives have a long history in the Middle East and Europe, from the neo-Platonists right through to Mirandola in the 15th century, but also through freemasonry, Mormonism, to the early Rosicrucian Golden Dawn of the late 19th and early 20th centuries. Another notable example of syncretism is Santería, a syncretic hybrid of African animism and Christianity. Also American Hoodoo (by certain practitioners using the Bible) among other similar religions. There are also those who practice from a combination of Neopagan/Wiccan and Christian perspectives, as for example in Christian Wicca or in some Gaian 'Goddess' communities. Other modern syncretic traditions include mesoamerican folk healing traditions, such as the curanderismo practices found in Mexico, and Andean folk healing traditions of Peru and Bolivia.
...European courts executed about 45,000 witches during the early modern period.