The 21-year-old's previous contract was set to expire at the end of this season, but he has now put pen to paper on a two-year extension that will keep him at the Liberty Stadium until 2019.
Roberts is currently on loan with League One side Bristol Rovers until January, although he is yet to make his debut for Darrell Clarke's side.
"I'm pleased to commit my future to the club for another three years. I haven't played yet at Bristol Rovers, but I've just got to keep working hard on the training ground and hope my chance will come," he told Swansea's official website.
Roberts spent last season on loan at Yeovil Town, where he made more than 50 appearances and won the club's Player of the Year award.