Great question. I do not think there is a full answer. One poster noted, properly, that none of us deserve God’s love and grace- or the forgiveness that He offers. Is justice a matter of getting what one deserves? Because, if so, isn’t mercy impossible?
We get some help from scripture, in the parable of the workers of the vineyard. Some work a full day, some work only a little while but all are paid in full. Is that just? It depends, I suppose, on your frame of reference. In the sense that each got exactly what he was promised for the work he did, it was certainly just. The only way we find injustice is if we compare the workers to one another. That simply is not the way God judges. We are not graded on a curve. He judges each individually.
Justice of man cannot be similar to God’s justice. When we make laws, for instance, we have to treat everyone the same. We have to apply laws in like manner to everyone. God is different in many ways, but specifically these two: 1. His goal. He is not trying to protect a community, but rather to perfect an individual. When he judges us, He does not judge a specific action but rather a specific and unique person. 2. His means. He has more information than we can ever hope to have. When we prosecute a criminal, we need to know if the crime was committed and if there are any obvious extenuating circumstances like coercion or mental illness. God knows more and takes more into account. Indeed, He knows everything, and takes everything into account.
His justice will never look like ours. He is also capable of greater mercy. He knows all our sins and faults. He offers forgiveness freely.