In a saucepan, combine sugar, cornstarch, and salt. Gradually whisk in milk until smooth.
Cook over medium heat, stirring constantly, until mixture thickens and comes to a boil. Boil for 1 minute, then remove from heat.
Stir in butter and vanilla extract until well combined.
Pour pudding into a mixing bowl. Cover with plastic wrap, pressing it directly onto the surface of the pudding to prevent a skin from forming. Chill in the refrigerator for at least 2 hours before serving.