"Let me use the kind of illustration that was obviously in the mind of Count Zindendorf when he composed his great hymn on this theme ... "Jesus Thy robe of righteousness, my beauty is, my glorious dress". This is the picture. There is a man standing in his rags, in his filth. There is the condemned, guilty sinner before God, the prisoner in the dock.
What happens? Well God puts on him this robe of righteousness - He puts on him the white robe of Christ's perfection and now He sees that and nothing else. That is the doctrine of justification. He puts that to our account".
Dr Martyn Lloyd-Jones - "Romans 3:20 - 4:25: Atonement and Justification" - Banner of Truth Trust, Edinburgh (1971) - (p174).