The 28-year-old winger has been at Swansea since 2009, where he has played 271 times, scoring 31 goals.
Dyer did not appear to be in former boss Garry Monk's plans last season and was loaned out to champions Leicester for the entire campaign.
However, it appears that Dyer has done enough to impress new boss Francesco Guidolin and Dyer says he is looking forward to being back in a Swansea shirt.
"I want to repay the club so it's nice to have signed a new deal," he said.
"I was going into the last year of my contract but the new deal will keep me here until I finish (my career).
"I've always seen myself to be here, once a jack always a jack, so you can say, I came here when I was younger I've learnt my trade. We've won and achieved so much and we've made history at this club".