The book of Deuteronomy points out how we can distinguish the true Word of God:
18 I shall raise up a prophet from their midst, one of their brothers, who will be like you. I will put my words into his mouth and he will tell them all that I command.
19 If someone does not listen to my words when the prophet speaks on my behalf, I myself will call him to account for it.
20 But any prophet who says in my name anything that I did not command, or speaks in the name of other gods, that prophet shall die."
21 You will perhaps ask: "How are we going to know that a word does not come from Yahweh?"
22 If any prophet speaks in the name of Yahweh and if that which he says does not happen, you shall know that the word does not come from Yahweh. The prophet has spoken to boast and you shall not pay any attention to him.
Deuteronomy C.: 18
How will you recognize the spirit of God?
1 My beloved, do not trust every inspiration. Test the spirits to see whether they come from God, because many false prophets are now in the world.
2 How will you recognize the spirit of God? Any spirit recognizing Jesus as the Christ who has taken our flesh is of God.
3 But any spirit which does not recognize Jesus is not from God, it is the spirit of the antichrist. You have heard of his coming and even now he is in the world.
4 You, my dear children, are of God and you have already overcome these people, because the one who is in you is more powerful than he who is in the world.
5 They are of the world and the world inspires them and those of the world listen to them.
6 We are of God and those who know God listen to us, but those who are not of God ignore us. This is how we know the spirit of truth and the spirit of error as well.
1º Epistle of John. C.: 4
By their fruits you will recognize them:
15 Beware of false prophets: they come to you in sheep's clothing but inside they are wild wolves.
16 You will recognize them by their fruits. Do you ever pick grapes from thornbushes, or figs from thistles?
17 A good tree always produces good fruit, a rotten tree produces bad fruit.
18 A good tree cannot produce bad fruit and a rotten tree cannot bear good fruit.
MATTHEW. C.: 7