A God that knows everything is called omniscient. Omniscience is a feature of the god of most monotheistic religions. But there are serious epistemological problems with the concept of omniscience, and 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 states 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 suras 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: 2 Proofs" 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 an 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. It 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. 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.
“'It was Gassendi's opinion, as may be seen in his objections to Descartes. '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.'”
"Voltaire's Philosophical Dictionary" by Voltaire (1764)1
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.
Some credit for this section goes to The Skeptic's Annotated Bible: 'God sees and knows all things' versus 'There are some things God doesn't know and can't see'.
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.
Hosea 8:4 - Some princes of Israel were set up without God's knowledge.
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! See: "God Never Needs to Test Us" by Vexen Crabtree (2005).
The Koran. Translation by N. J. Dawood. Penguin Classics edition published by Penguin Group Ltd, London, UK. First published 1956, quotes taken from 1999 edition.
The Bible (NIV). The NIV is the best translation for accuracy whilst maintaining readability. Multiple authors, a compendium of multiple previously published books. I prefer to take quotes from the NIV but where I quote the Bible en masse I must quote from the KJV because it is not copyrighted, whilst the NIV is. [Book Review]
Voltaire's Philosophical Dictionary (1764). Digital edition produced by Juliet Sutherland, Lisa Riegel and the Online Distributed Proofreading Team. Accessed via Amazon.co.uk