Psalm 24:3 Who shall ascend into the hill of the LORD?
or who shall stand in his holy place?
4 He that hath clean hands, and a pure heart;
who hath not lifted up his soul unto vanity,
nor sworn deceitfully.
5 He shall receive the blessing from the LORD,
and righteousness from the God of his salvation.
Jesus makes this point in the sermon on the mount
Matt 5:8 Blessed are the pure in heart: for they shall see God.
Paul encouraged Timothy in this doctrine, the the end of the commandment was love out of a pure heart.
1Tim 1:5 Now the end of the commandment is charity out of a pure heart, and of a good conscience, and of faith unfeigned: 6 From which some having swerved have turned aside unto vain jangling; 7 Desiring to be teachers of the law; understanding neither what they say, nor whereof they affirm.
2Tim 2:19 Nevertheless the foundation of God standeth sure, having this seal, The Lord knoweth them that are his. And, Let every one that nameth the name of Christ depart from iniquity.
20 But in a great house there are not only vessels of gold and of silver, but also of wood and of earth; and some to honour, and some to dishonour. 21 If a man therefore purge himself from these, he shall be a vessel unto honour, sanctified, and meet for the master's use, and prepared unto every good work. 22 Flee also youthful lusts: but follow righteousness, faith, charity, peace, with them that call on the Lord out of a pure heart. 23 But foolish and unlearned questions avoid, knowing that they do gender strifes. 24 And the servant of the Lord must not strive; but be gentle unto all men, apt to teach, patient, 25 In meekness instructing those that oppose themselves; if God peradventure will give them repentance to the acknowledging of the truth; 26 And that they may recover themselves out of the snare of the devil, who are taken captive by him at his will.
Prov 20:9 Who can say, I have made my heart clean,
I am pure from my sin?
Clearly letting us know that man is insufficient for this task
Who can cleanse the heart; the Lord will do so!
Psalm 51:10 Create in me a clean heart, O God;
and renew a right spirit within me.
11 Cast me not away from thy presence;
and take not thy holy spirit from me.
12 Restore unto me the joy of thy salvation;
and uphold me with thy free spirit.
13 Then will I teach transgressors thy ways;
and sinners shall be converted unto thee.
You can obey the truth, Christ Jesus is the way, the truth and the life
1Pet 1:22 Seeing ye have purified your souls in obeying the truth through the Spirit unto unfeigned love of the brethren, see that ye love one another with a pure heart fervently: 23 Being born again, not of corruptible seed, but of incorruptible, by the word of God, which liveth and abideth for ever.
Leading us the example here:
Heb 10:22 Let us draw near with a true heart in full assurance of faith, having our hearts sprinkled from an evil conscience, and our bodies washed with pure water.