Though Harry gets the starring role and Ron gets to be his best friend and sidekick, Hermione is the mastermind behind all their plots (except the weak ones), and the loyal friend who keeps them out of trouble (when they haven't already dug themselves too deep).