John 2:23-25 — Now when He was in Jerusalem at the passover, in the feast day, many believed in His name, when they saw the miracles which He did.
But Jesus did not commit Himself unto them, because He knew all men,
And needed not that any should testify of man: for He knew what was in man.
Jesus' miracles showed His power and glory. They were His credentials as King and Messiah and were the signs of the Kingdom.
Many of those who saw the miracles believed that He was who He said He was, but their hearts were not touched. They assented to outward evidence. Jesus knew their hearts.
In the Greek, it reads, "Many believed (trusted) in His name … But Jesus did not believe (trust) in them." He knew men's motives.