Now when He was in Jerusalem at the Passover, during the feast, many believed in His name when they saw the signs which He did. But Jesus did not commit Himself to them, because He knew all men, and had no need that anyone should testify of man, for He knew what was in man. John 2:23-25 NKJV
Let me make a few points about the original language of these verses. First, when it says that many believed on His name, it is implied that they believed in Him, as the name in Hebrew was a substitute for the person or object itself.
Also, the word “believed” in verse 23 and the “commit” in verse 24, are the same Greek word. This indicates that the people responded to Jesus in some manner, but He didn’t reciprocate in the same manner. The reason is that He truly knew their hearts.
Finally, when the passage says that Jesus knew what was in their hearts, this isn’t the same as you might say that a particularly perceptive knows you. This type of knowledge is only the kind which God knows and hints at the deity of Christ.
We also must believe in His name, not just because of what we see Him do, but because of who He is. Since Jesus is God, He knows our hearts. We can trust Him even though we are untrustworthy ourselves.