The 19-year-old has established himself as a regular in the first team this season after being drafted in to replace the injured Neil Taylor in September.
Davies has now made 11 Premier League appearances for the Swans and has also been capped twice by Wales after Chris Coleman selected him for the World Cup qualifiers against Scotland and Croatia.
He told the club's official website: "I'm delighted to have signed a new deal here.
"It shows the faith the club has in me and I've been rewarded for my performances so far.
"It is more security for me, and that will allow me to keep working as hard as possible to continue my development here.
"I have already learned a lot from not only playing, but by working hard in training with the manager, coaching staff and team-mates and taking as much advice as possible from them. It's a great time to be at Swansea City."