There are many villains I have loved, but Javert wins this one hands down.
If you've only seen the musical, you may be wondering why I consider Javert as a villain rather than an antihero or a heroic foil for the protagonist. Granted, I do love the Javert of the musical, especially when sung by the sublime Philip Quast, but I think the musical gives a rather more understanding portrait of the character than Hugo managed.
In the original book, it seems rather clear that Javert is indeed the villain. He stands for everything that the romantic humanist Hugo despised. Javert embodies the cold, cruel, unyielding fist of the state. He is the letter of the law deprived of its gentler spirit. Take the moment in which Javert recognises Valjean:
Javert, without stirring, without moving from his post, without approaching him, became terrible. No human sentiment can be as terrible as joy.
It was the visage of a demon who has just found his damned soul.
Javert is that perfect irony: a noble, ruthless man who perfectly upholds a system of broken laws. As Hugo said:
“Without knowing it, Javert in his awful happiness was deserving of pity, like every ignorant man who triumphs. Nothing could have been more poignant or more heartrending than that countenance on which was inscribed all the evil in what is good.”
I have tremendous sympathy for Javert. I tend to be rather rule-oriented myself, and I tend to find myself strongly swayed by the arguments of law and order. In fact, no matter how many times Hugo tells me that I should love the more flexible humanist Valjean, I find him-- and his contempt for the rules--to be vastly irritating.
Javert is a fascinating, complex, enigmatic character; a man without a first name or much of a past. All we know of him is that he was born in the prisons, and that some of his passion for the law may be his redirected anger. Javert is so memorable that he has become a trope in his own right. From the Dresden Files' Morgan to Inspector Basquiaz to Hrathen to (at certain moments) Sam Vimes, I seem to find myself on the side of any Javert-like character that I come across.
I am the law, and the law is not mocked!