To know that Jesus Christ is righteous is to know more than that he conforms to the outward expression of the law. It is to look deep into his heart on the basis of his words and actions, and to see the crystal clear depths of righteousness disappearing beyond the point we can follow them.
Looking at ourselves we see evidence of the profound change that God has worked in us, and we take courage from this.
How can John compare the mixed and faltering righteousness of even the best believer with the pure righteousness of Jesus Christ? If someone lacks his perfect righteousness, how can we be sure they are born again? Even though the believer still commits sin, he also does genuine and rightly motivated acts of obedience to God, which the world is not capable of. A man panning for gold is able to pick the gold out from the dirt, but if he finds none he throws away the whole pan.