Bring water and sugar to a boil in small saucepan, stirring occasionally, until sugar is dissolved, 5 to 10 minutes. Remove saucepan from heat and stir in raspberries. Mash mixture using a potato masher or fork. Let mixture 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.
If using frozen berries, add them while the syrup is on the burner. Return syrup and frozen berries to a boil; remove from heat, mash, and let steep as directed in the recipe.