Add sugar and water to a small saucepan and stir continuously over medium heat until sugar dissolves.
Remove pan from heat.
Add the sprigs of rosemary, stir, and cover pan to allow syrup to steep for 20 minutes.
Strain into storage container through a mesh strainer. Refrigerate and use within four weeks.