The best villains in fiction don't think of themselves as villains.
They have a worldview. A logic. A set of values that, from inside their own perspective, makes everything they do not just justifiable but necessary. They're not evil for evil's sake. They're wrong, often catastrophically wrong, but for reasons that make sense from where they're standing.
This is the thing that separates a compelling antagonist from a generic one. And it's the thing most writers get wrong.
The cardboard villain problem
The lazy villain has power, cruelty, and no discernible inner life. They want to conquer the world, destroy the hero, take the treasure. Why? Because that's what villains do.
The reader doesn't fear this person. They wait for the hero to defeat them.
The interesting villain has a reason. A grievance that might even be legitimate. A goal the reader can understand, even if the methods are unacceptable. The reader might find themselves, uncomfortably, following the argument.
That discomfort is where great antagonists live.
What they need
A villain who believes they're right needs three things.
A coherent worldview
Not a twisted version of the hero's values, but an internally consistent logic of their own. Thanos believes resources are finite and life is suffering; he frames mass extinction as an act of mercy. The reader can follow this logic even while finding it monstrous. The logic is the point.
Something they're protecting
Pure destruction is empty. The most compelling antagonists are protecting something: a community, a principle, a version of the world they believe is better. Magneto isn't wrong that humans have tried to exterminate mutants. His response is disproportionate, but the fear beneath it is real.
A history that explains them
Not an excuse. An explanation. We don't need to forgive the villain, but we need to understand how they got here. The backstory that made them doesn't justify what they do. It makes them human. That's more frightening than any amount of cruelty.
What this does to your story
When your villain is genuinely convinced of their own rightness, two things happen.
First, your hero's job becomes harder. It's easy to fight someone cartoonishly evil. It's much harder to fight someone making an argument you can't entirely dismiss. The debate raises the stakes intellectually, not just physically.
Second, your theme deepens. A story where good fights evil is a story about who wins. A story where two coherent worldviews collide is a story about what we believe and why. That's the territory of the books that stay with you.
Three villains who got this right
Walter White in Breaking Bad doesn't believe he's a criminal. He believes he's a man claiming what he's owed. Every step down is framed, by him, as reasonable.
Javert in Les Misérables is a villain only from Valjean's perspective. From his own, he's the law's faithful instrument, doing his duty. His tragedy is that he cannot survive encountering a good man who breaks his system.
Dolores Umbridge is more frightening than Voldemort to many readers because her evil is bureaucratic and self-righteous. She believes she's restoring order. That combination, total conviction and petty cruelty, is recognisable in a way that dark lords aren't.
A test
Ask yourself: could your villain give a ten-minute speech about why they're doing what they're doing, and would any of the audience be nodding along by the end?
If the answer is no, go deeper. Not to make them sympathetic. To make them real.
The most unsettling thing fiction can do is show you how reasonable a catastrophic position can look from the inside.
Character, conflict, and the forces that drive your story: The Silly Shirt Manifesto covers all of it.