A God that knows everything is called omniscient. The concept of omniscience has been around for thousands of years (for example, Homer said "The gods know everything"1), and omniscience is a characteristic of the god of most monotheistic religions. But there are serious epistemological problems with the concept of omniscience, and also there are negative side-effects: for example an infallible all-knowing God cannot have free will.
The Bible says God is perfect in knowledge, knows all thoughts, all secrets, sees all and no-one can hide from God. See: 1 Samuel 2:3, Job 28:24; 37:16; 42:2, Psalm 44:21; 139:4,7-8; 147:5, Proverbs 15:3, Jeremiah 16:17, 23:24, Acts 1:24, Hebrews 4:13, Matthew 10:30 and 1 John 3:19-20.
The Qur'an frequently asserts that God is all-knowing, all-hearing, and knows everything that is hidden. These verses occur frequently. In chapter two, for example, such statements are made in Sura 2:29, 2:77, 2:85, 2:115, 2:137, 2:158, 2:181, 2:224, 2:227 and 2:231.
God is all-knowing so it knows what all of its actions are, were, and will be. Its knowledge is infallible, so it seems, any omniscient being must be trapped in an existence where all choices are already made, so are predetermined. From before it even invented time, from its very essence, comes a complete knowledge of all of its future actions. God itself cannot exercise any free will. An omniscient God is, therefore, an automaton, something that doesn't make choices. It exists in a state where all its own actions are pre-seen and preordained. If it wanted to choose otherwise to what it knows about the future, it can only do so if its omniscient knowledge about the future is actually wrong. In other words, to exercise free will, an omniscient being has to cease to be omniscient. Any omniscient being has no free will. It is a bit of a stretch to say that such a being has "willpower" in any meaningful sense of the word. The robotic and automatic god that we are left with, if it is omniscient, is probably best thought of as a "law of nature" more akin to the atheistic laws of nature that we study through science. In other words, it seems that omniscience contradicts the very idea of godhood.
For more on the free will of God, see my page "God Has No Free Will" by Vexen Crabtree (2001); its page menu is:
If you knew everything, then you should know that you know everything. If you do not know if you know everything, then you don't know everything. So, would a god know everything? How would it know? There are some questions that even a god could not answer. One question proceeds from a possible being that God could create. God could create a solipsistic being and make that being so that it thinks it created the universe. It could give such a being all knowledge except knowledge that it itself was created. Such a being would have no idea that it was, in fact, a created being and that there was another, higher, creator. If God wanted to create such a deluded being, it could do so. The problem is, our theorized God itself does not know if it exists in such a state of ignorance. In short, God cannot know if it does actually know everything. There is no way for it to even verify that it is indeed the true creator god.
All intelligent sentient beings must realize that without verification from other beings than itself or from science, it cannot know if it is correct in its world view. It doesn't matter how intelligent or knowledgeable a being is - if that being wants to verify its knowledge to make sure that it is correct then it needs to look to something more intelligent than itself, or to science. But what if you are the creator of science? You couldn't then use your own construct to test if your own construct was true, it would be a circular and invalid test. If god attempted to find out if it did indeed know everything, it would realize that it has no way to know. How does it know it knows everything? It merely thinks it does. God has no test, method or possibility of finding out if it does indeed know everything. God could itself be a created being, with another creator hiding secretly behind it. It wouldn't know. In short, it does not and cannot know if this is true. Also, what if God uses its power to intentionally forget something? For Christians, this is exactly what the Bible says God can do, in Isaiah 43:25. If an omniscient and omnipotent being has chosen not to know something, then it may, or may not, know that it doesn't know. The worst possibility is when it erases its own knowledge of self-forgetting. It can therefore never know that it doesn't know something. It can't check. God does not know everything and is not omniscient. In fact, no being can know everything because no being, however creative or perfect, can verify that its own knowledge is complete.
"I think therefore I am" is as true for God as it is for any being. But: God cannot account for its own nature. Whatever facet of personality, willpower or desire it examines about itself, it will find that it cannot find out why it is like it is. Why does God know everything? Why is god good-natured, or, creative, or loving? (If it indeed it is those things, of course). It seems that all-knowing is not an attainable state. Immanuel Kant says that it is impossible, through self-reflection, to know your own substance. He adds:
“For as he does not as it were create himself, and does not come by the conception of himself a priori but empirically, it naturally follows that he can obtain his knowledge even of himself only by the inner sense and, consequently, only through the appearances of his nature and the way in which his consciousness is affected.”
"Fundamental Principles of the Metaphysic of Morals" by Immanuel Kant (1785)3
An omniscient being is in the same boat: it cannot self-verify. Gassendi came to the same conclusion, as reported by Voltaire:
“'It is true,' says Gassendi, 'that you know what you think; but you are ignorant of what species of substance you are, you who think. Thus although the operation of thought is known to you, the principle of your essence is hidden from you; and you do not know what is the nature of this substance, one of the operations of which is to think.'”
Assume that God does know everything. For some reason god chooses not to know something. It erases something from its own knowledge, and, makes it so that it hasn't known about it for all of time so it can't simply look into a different time when it did know. It then removes its own memory of having intentionally forgotten something. I argue in "The Four Dimensions and the Immutability of God" by Vexen Crabtree (2007) that God can't do such things. But I might be wrong, so here's the clincher:
How would god know now if it had intentionally chosen not to know something? It wouldn't be able to contradict its own will in choosing not to know, but if it destroyed the memory of making such a choice, it also wouldn't know if it had actually forgotten anything. This is another (admittedly tenuous) class of self-knowledge that any being lacks and can never know. Without an answer to this potential source of agnosia, no being that aspires to omniscience can be truly omniscient.
The Bible says God is perfect in knowledge, knows all thoughts, all secrets, sees all and no-one can hide from God. See: 1 Samuel 2:3, Job 28:24; 37:16; 42:2, Psalm 44:21; 139:4,7-8; 147:5, Proverbs 15:3, Jeremiah 16:17, 23:24, Acts 1:24, Hebrews 4:13, Matthew 10:30 and 1 John 3:19-20. Yet there are plenty of times when God doesn't know things, such as where people are. Check these verses:
God appears to not know where Adam is in Genesis 3:8-9, and, to not know if they have eaten from the Tree of Knowledge of Good and Evil (3:11). Either that, or God is deceiving them by making them think that it doesn't know, by asking them questions. If Adam and Eve knew God, though, surely they would know that God is all-knowing. Therefore the proceedings here do not seem to make much sense.
Genesis 18:20-21 - "20Then the LORD said, “The outcry against Sodom and Gomorrah is so great and their sin so grievous 21that I will go down and see if what they have done is as bad as the outcry that has reached me. If not, I will know.”"
Genesis 32:22-30 - In this obscure story, Jacob wrestles with God in bodily form and sees God face-to-face. God asks Jacob what Jacob's name is; yet an all-knowing god would surely know!
Numbers 22:9 - Balaam and some Moabite officials spend a night waiting for God, who duly pops down for a visit, "And God came unto Balaam, and said, What men are these with thee?" An all-knowing God would have known.
Sometimes, it is said in the Bible that God tests people. In Deuteronomy 8:1-2 God reveals that the 40-years in the wilderness was a test done by God to find out what was in people's hearts - whether they would still obey orders. In Deuteronomy 13:1-5 God sends some false prophets and wonder-workers as tests to see if people will follow other gods, and in 2 Chronicles 32:31 God is doing similar fact-finding tests. In Genesis 22:1 God tempts Abraham, and Job lost everything as part of a horrible series of tests done by Satan and God in collaboration, of Job's loyalty to God. Yet an all-knowing God, creator of all time, knows exactly who will pass any tests, and knows exactly what is in everyone's heart. So either God is lying about his reasons, or, god is not actually all-knowing. Strangely, in James 1:13 it says that no-one can say that God has tempted them with evil, because "God tempteth no man". These contradictions to logic, and, contradictions to other verses, clearly indicate that the authors of the Bible did not have a particularly good grasp of theology or philosophy, and could not have been inspired by God to write what they wrote!
The Qur'an frequently asserts that God is all-knowing, all-hearing, and knows everything that is hidden. These verses occur frequently. In chapter two, for example, such statements are made in Sura 2:29, 2:77, 2:85, 2:115, 2:137, 2:158, 2:181, 2:224, 2:227 and 2:231. Yet the Qur'an contradicts these verses in places, where it says that God tests people. Qur'an 2:144-149 has the direction of prayer change from Jerusalem to Mecca as a test 'to make evident' those who will comply with Allah. In Qur'an 47:29-33 God makes it clear that it knows specifically which people have failed its tests and that it could, if it chooses, show them out to everyone. It says that all people (especially the faithful) are tested, and those who do well are properly rewarded. 22:51-53 warns that God lets Satan insert "suggestions" into God's communications in order to rest people's responses. It does of course make no sense, because no omniscient God needs to test anyone as it does, of course, know who will or won't pass the test even without actually doing the test. It makes no sense for an all-knowing God to "test" people at all. So those verses are either contradicting the verses that say God is omniscient, or, they are simply wrong (or lying!) about the reason behind the 'tests'.
The Rig Veda, authored between 1500 to 1200 BCE, has the Creation Hymn open with a long series of questions, the answers to which are simply unknowable. Why and how was reality created? Its conclusion is that perhaps the ultimate creator itself doesn't even know those answers - a case of divine agnosticism.
“Who really knows? Who will here proclaim it? Whence was it produced? Whence is this creation?
The gods came afterwards, with the creation of this universe. Who then knows whence it has arisen?
Whence this creation has arisen - perhaps it formed itself, or perhaps it did not - the one who looks down on it, in the highest heaven, only he knows - or perhaps he does not know.”