Justice is ... well ... "just". (Based on or behaving according to what is morally right and fair.)
Revenge may be "just" or not. EG: (Not "just") a criminal getting revenge against someone for testifying against them. Or it may go beyond "just" ... someone damages your car (but doesn't injury you), then you destroy their job and social life.
Revenge is an attempt to "settle a score" - by taking matters into one's own hands. However, what that "score" may be is up to the one(s) seeking revenge. Revenge is its own judge, jury and executioner. Revenge is nearly always from selfish motives.
Justice is what the law prescribes. Meaning it listens to all sides of a mater and then renders a fair verdict (e.g punishment fits crime).
When other factors are allowed to enter into providing justice (e.g. bribes, preferential treatment, biases) true justice can NOT be administered.
Justice looks for balance of wrongdoing objectively. Its only aim is to seek fairness and exact correct punishment, if necessary.
Revenge is the exact opposite. It is a vigilante approach. It's only aim is to make the victim suffer and that feeds the vigilante's ego. No one gains from revenge, least of all the perpetrator of revenge.