A character who contrasts with another character - usually the protagonist - to highlight specific traits, values, or choices through comparison.
A foil is a character whose qualities - personality, background, decisions, values - are deliberately set against another character's to make both stand out more clearly. Think of it like holding up a dark fabric behind a gemstone: the contrast makes the stone's color pop. Foils don't have to be opposites in every way. In fact, the most effective foils share key similarities with the character they contrast, which makes their differences feel more meaningful and deliberate.
Foils are one of the subtlest and most powerful characterization techniques you can use. Instead of telling readers that your protagonist is brave, you place them next to a character who handles the same situation with cowardice - and readers draw the conclusion themselves. This is show-don't-tell at the structural level. Foils also add thematic depth by embodying the road not taken, showing readers what the protagonist could have become under different circumstances.
Sydney Carton and Charles Darnay look alike but live opposite lives - Carton's dissolution contrasts with Darnay's virtue, making Carton's final sacrifice devastatingly powerful.
Hassan serves as a foil to Amir - Hassan's courage, loyalty, and moral clarity throw Amir's cowardice and guilt into sharp relief.
Nick and Amy Dunne foil each other's dishonesty, selfishness, and performance of identity, creating a toxic mirror that drives the thriller.
Mercutio's cynical wit foils Romeo's romantic idealism, and Tybalt's hot-headedness foils Benvolio's peacemaking - Shakespeare layers multiple foil relationships throughout.
Foils need to be real characters, not just contrast machines. Give them motivations that make sense from their own point of view.
Some of the best foils are friends, siblings, or allies. The contrast can be gentle and illuminating rather than hostile.
Let the contrasts emerge naturally through action and dialogue. If you have to point out that two characters are different, you probably haven't shown it well enough.
Take your protagonist and create a foil who shares one important trait with them (same profession, same fear, same goal) but differs in a crucial way. Write a scene where both characters face the exact same problem and handle it differently. Keep it to 400 words and let the contrast speak for itself - no narrator commentary needed.