The Wales international would have been out of contract in the summer, but his new contract extends his stay through to 2016.
He said: "I'm delighted to have signed a new contract at the club.
"Being a Swansea boy, I see my career at the club and I was very keen to commit my future to the Swans."
Richards has yet to make a Premier League appearance under Michael Laudrup and is currently on loan at Championship promotion-hopefuls Crystal Palace.
"The plan is to finish the season strongly and try my best to get Palace into the Premier League," he added.
"Then I'll return to Swansea and look to impress Michael Laudrup enough to be involved regularly in his first-team plans."