You are very wise to verify an important truth like salvation from Scripture. Sometimes people will come up with an idea and say that it’s in the Bible, when in fact it’s not.
You can be sure that the Bible is full of information about salvation, and it is very clear that we are saved only by God’s grace through Jesus Christ. Now, to be clear, there isn’t a Bible verse that says, “You must accept Jesus Christ as your Savior before you die in order to be saved,” and that’s not what you’re asking. What you want is evidence that this is what the Bible teaches. So what we’re going to do is take you through a few verses that point to this. You can look up these verses on your own.
First we have to find what the Bible says about the human condition. Here you need to read Romans 3:23, which says that every person has sinned and falls short of God’s perfect standard. Next, you have to see that there’s a death penalty for sin (for that go to Romans 6:23). The conclusion of Scripture is unmistakable: Every person is a sinner, and sin leads to death. Not good for the human race!
Now go to John 3:16, the most popular verse in the Bible. This verse makes it clear that God sent Jesus into the world so that all who believe in Him would have eternal life. Everyone still dies in the physical sense, but those who put their faith in Jesus will have eternal life.
Finally, we need to know that there is no other way to have eternal life, except to go through Jesus Christ. He is the only way to be saved from eternal death (John 14:6, Acts 4:12). And there’s no other way to receive salvation through Jesus except through faith. Our good deeds won’t do it (Ephesians 2:8-9).
There are many other verses we could show you, but these are some of the clearest. Hopes this helps answer your question. May God bless you!