The 21-year-old, who has made more than 100 first-team appearances for United, has scored six goals this season.
Armstrong is the latest player in Jackie McNamara's exciting young squad to agree a new deal, with Ryan Gauld, John Souttar and Nadir Ciftci also putting pen to paper.
And McNamara is delighted the players are showing some loyalty to the club rather than making swift departures.
McNamara said: "I think they just let them get on with their football and develop and do things properly.
"This is the best place for them, as we've said a number of times, to develop. And they're getting game time. They're still young but they're getting better and better.
"Stuart's got everything in his game to go to the very top and I'm happy he wants to stay here and get the games under his belt.
"It was his 100th game I think at the weekend. But he plays with a maturity there, the runs he makes, and he's scored some vitals goals so far for us this season.
"And he's one that he'll only get better as well."
Armstrong insists he had no hesitation in agreeing a new deal with the Scottish Premiership side.
"I think it's very important to have a few seasons under your belt before pursuing other options," Armstrong said.
"I want to keep playing for Dundee United and add more games to the games I've already played and play well more importantly."