One type of deception in Twelfth Night is the kind used to deceive others but without malicious intentions. This type of deception is used only to protect one's self. After being rescued by a captain from a shipwreck and taken to Illyria, Viola feels the need to deceive the strangers of Illyria in order to protect herself. Her father died recently and now she believes her brother has also died, being unable to escape drowning in the shipwreck, making her a single, orphaned woman without any male protection. What's more, she is a wealthy noble woman. As she explains to the captain, she feels it is unsafe and unwise to disclose her true, vulnerable identity because it would be very easy to take advantage of a woman in her position. She first thinks of going to the house of Olivia to try and work as a servant, but when the sea captain tells her Olivia will reject her services, she next thinks of disguising herself as a eunuch to work for Duke Orsino. We see just how concerned Viola is about disclosing her identity as a single, wealthy woman, leading her to decide to disguise herself, in her lines:
O that I served that lady [Olivia]
And might not be delivered to the world,
Till I had made mine own occasion mellow,
What my estate is! (I.ii.43-46)
A second form of deception found in the play is deception of others with malicious intentions. Malvolio is primarily the victim of this type of deception. Maria, Sir Toby, and Sir Andrew decide to deceive Malvolio into thinking Olivia is in love with him, and then the continue things further by pretending he has lost his mind and locking him away in darkness. Even Feste joins in on the deception by pretending to be the curate and pronouncing Malvolio to be insane. While Malvolio certainly is overly proud and pompous, these characters' deception serves no other purpose than being malicious, showing us that a second form of deception found in the play is malicious deception.
A third type is self-deception. While many characters are victims of deception, this deception could not be a success without the power of self. Olivia allows herself to be deceived into thinking she is in love with Viola as Cesario, even though she sees love as a madness. She then very easily allows herself to be deceived into thinking that Sebastian is Cesario and that finally he is returning her love. Even Duke Orsino allows himself to be deceived into believing that Viola is a man. Finally, Malvolio allows himself to be deceived into believing Olivia is in love with him and wants to marry him, showing us that self-deception is as central a theme as deception.