The 29-year-old, who can play at scrum half or out-half, has won 71 international caps with South Africa, the latest of which came in the Rugby Championship decider against the All Blacks last Saturday.
Commenting on his contract extension with the Ulstermen, Pienaar said: "I am delighted to be staying at Ulster. I have really enjoyed my first three seasons at the province and I am looking forward to helping the team compete for silverware in the coming years."
"The announcement of this contract will give everyone at Ulster Rugby - the players, the staff and the fans a huge lift - especially as it had been wrongly reported that Ruan would be leaving us.
"It was no surprise to us that his services were coveted by other clubs, but we always knew that what we could offer him in terms of a great playing squad, a world class stadium and state-of-the-art training facilities would be enough to make him want to stay.
"Ruan's decision to commit to three more years at Ravenhill is a huge endorsement of what we are doing at Ulster and I have no doubt that he will be a key part of our success in the coming seasons."