Bring water and sugar to a boil in a small saucepan, stirring occasionally, until sugar is dissolved, 5 to 10 minutes. Remove from heat, stir in raspberries, and mash with a potato masher or fork. Let steep for at least 1 hour.
Drain mixture through a fine mesh strainer, pressing raspberry pulp with a spatula to extract as much liquid as possible. Discard solids and store syrup in a sealed container in the refrigerator.