Short answer
Use the tests the Bible itself gives. Moses gave the first one. If a prophet speaks in the LORD's name and his word does not come true, the LORD did not speak it. Jesus added that you will know false prophets by their fruits. He warned that false Christs would show great signs, so wonders prove nothing alone. He also said not to believe anyone who says Christ is here or there. Jesus told his disciples to give freely what they had freely received. The Qur'an gives matching marks. A true messenger asks no reward, and none is more wicked than one who claims a revelation he never received. The Prophet Muhammad (ﷺ) meets these marks. He asked no payment for the message, and the Qur'an's promise that the beaten Romans would win within a few years came true.
Full explanation
The test Moses gave
Deuteronomy, the fifth book of the Bible, asks how Israel can know a word the LORD has not spoken. Its answer is plain: a prediction that fails. About 600 BC, a man named Hananiah spoke as a prophet. He promised in the LORD's name that Babylon's rule over the nations would be broken within two years. Jeremiah answered that the LORD had not sent him. He foretold that Hananiah would die that year. Jeremiah's word came true, and Hananiah's did not.
“When a prophet speaketh in the name of the Lord, if the thing follow not, nor come to pass, that is the thing which the Lord hath not spoken, but the prophet hath spoken it presumptuously: thou shalt not be afraid of him.”
“And Hananiah spake in the presence of all the people, saying, Thus saith the Lord; Even so will I break the yoke of Nebuchadnezzar king of Babylon from the neck of all nations within the space of two full years. And the prophet Jeremiah went his way.”
“Then said the prophet Jeremiah unto Hananiah the prophet, Hear now, Hananiah; The Lord hath not sent thee; but thou makest this people to trust in a lie. Therefore thus saith the Lord; Behold, I will cast thee from off the face of the earth: this year thou shalt die, because thou hast taught rebellion against the Lord. So Hananiah the prophet died the same year in the seventh month.”
What the prophets said about lying visions
Jeremiah and Ezekiel, prophets of Israel, describe men who say "The Lord saith" when God (﷾) has not sent them. These men still expect their words to be confirmed. Isaiah sends every claim back to the law and the testimony. The First Letter of John, in the New Testament, tells believers to test the spirits. Many false prophets, it says, have gone out into the world.
“Then the Lord said unto me, The prophets prophesy lies in my name: I sent them not, neither have I commanded them, neither spake unto them: they prophesy unto you a false vision and divination, and a thing of nought, and the deceit of their heart.”
“They have seen vanity and lying divination, saying, The Lord saith: and the Lord hath not sent them: and they have made others to hope that they would confirm the word. Have ye not seen a vain vision, and have ye not spoken a lying divination, whereas ye say, The Lord saith it; albeit I have not spoken?”
“To the law and to the testimony: if they speak not according to this word, it is because there is no light in them.”
“Beloved, believe not every spirit, but try the spirits whether they are of God: because many false prophets are gone out into the world.”
What Jesus added
Jesus gave a second test. A false prophet looks like a sheep, but his fruits show what he is. He also warned that signs and wonders prove nothing by themselves. False Christs would work great signs. Many who cast out devils in his name would hear him say he never knew them. He said not to believe anyone who announces that Christ is here, in the desert or in a secret room. He said his coming would be seen like lightning across the sky.
“Beware of false prophets, which come to you in sheep’s clothing, but inwardly they are ravening wolves. Ye shall know them by their fruits. Do men gather grapes of thorns, or figs of thistles? Even so every good tree bringeth forth good fruit; but a corrupt tree bringeth forth evil fruit. A good tree cannot bring forth evil fruit, neither can a corrupt tree bring forth good fruit. Every tree that bringeth not forth good fruit is hewn down, and cast into the fire. Wherefore by their fruits ye shall know them.”
“Many will say to me in that day, Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works? And then will I profess unto them, I never knew you: depart from me, ye that work iniquity.”
“Then if any man shall say unto you, Lo, here is Christ, or there; believe it not.”
“For there shall arise false Christs, and false prophets, and shall shew great signs and wonders; insomuch that, if it were possible, they shall deceive the very elect.”
“Wherefore if they shall say unto you, Behold, he is in the desert; go not forth: behold, he is in the secret chambers; believe it not. For as the lightning cometh out of the east, and shineth even unto the west; so shall also the coming of the Son of man be.”
Wonders that need no God
Franz Anton Mesmer was a physician in Paris before the French Revolution. He drew convulsions and trances from his patients without using God's (﷾) name. In 1784 a royal commission tested his method, partly on blindfolded subjects. It included Benjamin Franklin and the chemist Antoine Lavoisier. It found that his magnetic fluid did not exist and that the effects came from the patients' imagination. The same results came from a man who never names God. So they cannot prove that God (﷾) is with a healer who does. A Christian ministry also checked the best documented healings in one famous healer's book. It found that they did not hold up.
The commissioners appointed by King Louis XVI tested the method taught by Franz Anton Mesmer, including trials in which the subjects were blindfolded. They concluded that the magnetic fluid Mesmer claimed to use did not exist, and that the convulsions and other effects came from the imagination of the patients.
A Christian ministry's review of the medically documented healings printed in Benny Hinn's 1993 book Lord, I Need a Miracle. It found that in one case the malignant tumour had apparently been removed by surgery, and that another case was lupus, a disease known to go into remission on its own, where the joint damage the disease had caused was not healed.
Messengers do not sell the message
Jesus sent his disciples to heal with the words "freely ye have received, freely give". Later a man named Simon offered Jesus' disciples money for the power to give the Holy Ghost. Peter told him his money would perish with him. Second Peter, a letter in the New Testament, warns of teachers who make merchandise of believers. The Qur'an gives the same mark: follow those who ask no reward. Noah tells his people that he asks no reward, because his reward is with the Lord of the Worlds. The prophets Hud, Salih, Lot and Shu'ayb repeat the same words in the same chapter.
“Heal the sick, cleanse the lepers, raise the dead, cast out devils: freely ye have received, freely give.”
“And when Simon saw that through laying on of the apostles’ hands the Holy Ghost was given, he offered them money, Saying, Give me also this power, that on whomsoever I lay hands, he may receive the Holy Ghost. But Peter said unto him, Thy money perish with thee, because thou hast thought that the gift of God may be purchased with money. Thou hast neither part nor lot in this matter: for thy heart is not right in the sight of God.”
“And through covetousness shall they with feigned words make merchandise of you: whose judgment now of a long time lingereth not, and their damnation slumbereth not.”
“"Obey those who ask no reward of you (for themselves), and who have themselves received Guidance.”
“"No reward do I ask of you for it: my reward is only from the Lord of the Worlds:”
A dated prediction that failed
Hippolytus of Rome was a Christian writer of the third century. Around 204 CE he reckoned from the Bible that about 500 years remained from the birth of Christ to the end. The date passed. In modern times the American radio preacher Harold Camping named 21 May 2011 as the day of the Rapture. The Rapture is the moment when, some Christians believe, believers will be taken up to meet Christ. That day passed too, like every date set between them. Jesus had already said that no man knows the day or the hour.
Hippolytus reckons that Christ was born 5,500 years after creation and that the world will last 6,000 years, so that about 500 years remained from the birth of Christ to the end.
After 1994 passed, Camping set a new date: the Rapture on 21 May 2011, followed by the end of the world later that year.
“But of that day and hour knoweth no man, no, not the angels of heaven, but my Father only.”
The same test and the printed Bible
Ezekiel 26 says Tyre will be built no more. Three chapters later the same book says that the army of Nebuchadnezzar, king of Babylon, got nothing from Tyre for its long siege. Today Tyre is a town in Lebanon. A Muslim need not call Ezekiel false. The test still stands: words that fail it did not come from God (﷾) in the form they are printed. Jeremiah himself warned of the false pen of the scribes. The Qur'an claims no such allowance for itself. It says Allah (﷾) guards it, and its own forecast about the Romans came true.
“And I will make thee like the top of a rock: thou shalt be a place to spread nets upon; thou shalt be built no more: for I the Lord have spoken it, saith the Lord God.”
“Son of man, Nebuchadrezzar king of Babylon caused his army to serve a great service against Tyrus: every head was made bald, and every shoulder was peeled: yet had he no wages, nor his army, for Tyrus, for the service that he had served against it:”
Tyre (Arabic Sur) is a town on the coast of southern Lebanon and was a leading Phoenician city. Nebuchadnezzar II of Babylon besieged it for thirteen years (585–573 BC); the island city was not stormed, but made terms and accepted Babylonian overlordship. Alexander the Great took it in 332 BC. It was rebuilt and remained an inhabited city under later empires, and it is a town of Lebanon today.
““ ‘How do you say, “We are wise, and Yahweh’s law is with us?” But, behold, the false pen of the scribes has made that a lie.”
“We have, without doubt, sent down the Message; and We will assuredly guard it (from corruption).”
What the Qur'an says about false claimants
The Qur'an names the worst wrongdoer as one who invents a lie against Allah (﷾). It also names the one who says "I have received inspiration" when he has received none. The Prophet (ﷺ) foretold that about thirty liars would appear before the Hour, the end of the world. Each would claim to be a messenger of Allah (﷾). So Muslims, like Moses, expect false prophets and test them.
“Who can be more wicked than one who inventeth a lie against Allah, or saith, "I have received inspiration," when he hath received none, or (again) who saith, "I can reveal the like of what Allah hath revealed"? If thou couldst but see how the wicked (do fare) in the flood of confusion at death! - the angels stretch forth their hands, (saying),"Yield up your souls: this day shall ye receive your reward,- a penalty of shame, for that ye used to tell lies against Allah, and scornfully to reject of His signs!"”
Abu Hurayra reports that the Prophet (ﷺ) said the Hour will not come until two groups with the same claim fight each other with great losses, and until about thirty liars appear, every one of them claiming to be a messenger of Allah.
The Prophet (ﷺ) under the same tests
The Prophet Muhammad (ﷺ) was told to say that he asked no reward for the message. He asked only that people take the straight path to their Lord. He died with his armour held by a Jewish man as security for barley. Persia had taken Jerusalem from the Romans in 614. The Qur'an then said the beaten Romans would win within a few years. The emperor Heraclius began winning battles against Persia in 622, and by 627 Persia was beaten. The prediction came true.
“Say: "No reward do I ask of you for it but this: that each one who will may take a (straight) Path to his Lord."”
“Say: "No reward do I ask of you for this (Qur'an), nor am I a pretender.”
Aisha reports that when the Prophet (ﷺ) died, his armour was held by a Jewish man as security for thirty measures of barley.
“The Roman Empire has been defeated- In a land close by; but they, (even) after (this) defeat of theirs, will soon be victorious- Within a few years. With Allah is the Decision, in the past and in the Future: on that Day shall the Believers rejoice-”
A history of the Roman (Byzantine) emperor Heraclius. It records the Persian conquests of Roman lands, including Jerusalem in 614, and Heraclius' counter-campaigns from 622, which ended with his victory near Nineveh in 627 and the Persian surrender of the conquered lands.
The Tyre prophecy
Ezekiel 26:14 — Nevi'im, Yechezkel, chapter 26, verse 14
“And I will make thee like the top of a rock: thou shalt be a place to spread nets upon; thou shalt be built no more: for I the Lord have spoken it, saith the Lord God.”
Cited for
Christians say the prophecy speaks of "many nations" coming against Tyre over time. Nebuchadnezzar began it, and Alexander the Great finished it in 332 BC, leaving the old site bare.
The response
The verse says Tyre "shalt be built no more", and verse 21 says it will never be found again. Tyre was rebuilt and is a living town today. Ezekiel 29:18 itself says Nebuchadnezzar got no wages from Tyre. So the book admits that the attack it describes did not do what it foretold.
Where it lands — By Deuteronomy's test the words as printed did not come to pass, so they cannot be the LORD's words in their present form.
Perspectives
The Bible's own tests
The Bible gives five marks of a false prophet. They are a failed prediction, bad fruit, great signs used to deceive, a claim that Christ has appeared somewhere, and selling God's gifts.
Deuteronomy 18:22 gives a test. A word spoken in the LORD's name which does not come to pass is a word the LORD has not spoken.
Jeremiah told Hananiah that the LORD had not sent him. The text records that Hananiah died the same year.
Jesus said false prophets are known by their fruits. He also said that miracles done in his name do not prove a man is his.
Jesus told his followers not to believe anyone who says Christ is here or there.
Jesus told his disciples to heal without charge. Peter condemned Simon for trying to buy the gift of God.
Some preachers set dates for the end, from Hippolytus in the third century to Harold Camping in 2011. Each was proved wrong when the date passed.
The Islamic perspective
The Qur'an confirms matching marks, and the Prophet Muhammad (ﷺ) meets them. He asked no reward, and what the Qur'an foretold came true.
The Qur'an calls the one who falsely claims revelation the most wicked of people.
The Qur'an's prophets, one after another, ask their people for no reward.
The Prophet (ﷺ) foretold that about thirty false claimants to prophethood would appear before the Hour.
The Qur'an foretold a Roman victory within a few years of a Roman defeat. Heraclius had won that war by 627.
By the Bible's own tests, the Prophet Muhammad (ﷺ) is not found false. He asked no reward, and what the Qur'an foretold came to pass.