What is the difference between avenge and revenge?

To avenge is to punish a wrong with the idea of seeing justice done. Revenge is harsher and/or less concerned with justice than with retaliating by inflicting harm.

Her father avenged her death by working to have the man arrested, tried, and convicted, while her boyfriend took revenge by killing the man's wife.