For the majority of the series, Karin was portrayed as a villain by the very fact she is associated with Sasuke. However, unlike some other bad guys in the show, she doesn't commit any atrocities. So, it was easy to eventually transition the character from villain to hero during the Shinobi War.