Place the rosemary sprigs on a cutting board and gently bruise them with the back of a knife to release their oils. Transfer the sprigs into a small saucepan and add the water and sugar.
Heat the saucepan over medium heat, stirring until the sugar completely dissolves. Once boiling, remove from heat and allow the mixture to steep for 30 minutes.
Strain the syrup through a fine mesh strainer to remove the rosemary. Let the syrup cool completely before transferring it to a jar or bottle with a tight-fitting lid. Refrigerate and use within one week.