The Spirit Himself bears witness with our spirit that we are children of God. (Romans 8:16, NKJV)
The Spirit bears testimony concerning who is a child of God by means of the truth He revealed and inspired. We have that testimony today in the form of the Holy Scriptures. Our spirit agrees with the Spirit’s testimony when we believe and conform to the truth of the gospel He gave us. For an example of this, see Acts 19:1-5, where some disciples of John did not know of the baptism of Jesus. They had received John’s baptism, but they were not yet followers of Jesus. Paul inspired by the Holy Spirit, taught them of Jesus Christ. “When they heard this, they were baptized in the name of the Lord Jesus” (Acts 19:5). Now, the Spirit’s testimony agreed with their testimony that they were children of God. Before they heard the Spirit’s testimony, believed it and were baptized, although they thought they were saved, the Spirit said otherwise. To be sure you are a child of God, your belief and obedience must agree with what the Spirit says about becoming a child of God. Listen to what the Spirit has said: “For you are all sons of God through faith in Christ Jesus. For as many of you as were baptized into Christ have put on Christ” (Galatians 3:26-27). Are you a child of God? The Spirit bears witness that you are, when you have believed and been baptized into Christ.