Many people like to give philosophically and historically argued answers to this question. For such responses, please visit these articles:
But human arguments aren’t the best way to know the Bible is true. God’s activity in our life is the best way to know Him, by which I mean God’s personal self-disclosure in nature and through the testimony of the Holy Spirit.
In Romans 1:18-22 we read:
18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who by their unrighteousness suppress the truth.
19 ¶ For what can be known about God is plain to them, because God has shown it to them.
20 For his invisible attributes, namely, his eternal power and divine nature, have been clearly perceived, ever since the creation of the world, in the things that have been made. So they are without excuse.
21 For although they knew God, they did not honor him as God or give thanks to him, but they became futile in their thinking, and their foolish hearts were darkened.
22 Claiming to be wise, they became fools,
So God makes Himself known to all men through nature.
Concerning those who hear the word of God, Paul teaches in 1 Corinthians 2:11-16:
11 For what man knows the things of a man except the spirit of the man which is in him? Even so no one knows the things of God except the Spirit of God.
12 Now we have received, not the spirit of the world, but the Spirit who is from God, that we might know the things that have been freely given to us by God.
13 These things we also speak, not in words which man’s wisdom teaches but which the Holy Spirit teaches, comparing spiritual things with spiritual.
14 But the natural man does not receive the things of the Spirit of God, for they are foolishness to him; nor can he know them, because they are spiritually discerned.
15 But he who is spiritual judges all things, yet he himself is rightly judged by no one.
16 For “who has known the mind of the LORD that he may instruct Him?” But we have the mind of Christ.
So we who hear the word of God and are spiritual, having chosen to believe in Jesus, and having received the Holy Spirit, “know the things that have been freely given to us by God.”
Paul further teaches in 1 Corinthians 6:19,20:
19 Or do you not know that your body is the temple of the Holy Spirit who is in you, whom you have from God, and you are not your own?
20 For you were bought at a price; therefore glorify God in your body and in your spirit, which are God’s.
So those who receive the Spirit of God have the Holy Spirit living within them. This is how we know the Gospel of Jesus Christ is true.
This is the most powerful way of knowing the Bible is true.
But what about those who don’t hear about Jesus before they die? This question is answered in the following article: