Put water, sugar, and chopped pistachios in a medium saucepan and bring mixture to a boil.
Once boiling, lower heat and let simmer for about 10 minutes, until mixture has thickened a bit. Remove from heat and stir in salt if you used unsalted pistachios.
Strain the mixture into a bowl, leaving behind the pistachios (I recommend saving them for snacking or topping ice cream with!). Keep mixture in bowl or transfer into a mason jar and place in fridge to cool completely. Syrup will continue to thicken as it cools.