In a medium saucepan, combine the blueberries, sugar, water, and salt. Stir well, and bring to a boil over high heat.
Turn the heat to high and bring the mixture to a boil.
Once boiling, reduce the heat to medium-low, and simmer for 10 minutes, stirring occasionally. The syrup will thicken and turn dark purple.
Remove from the heat and pour the syrup through a strainer into a mason jar or heatproof container. Use a spatula to press out all the liquid from the mashed berries, and reserve the blueberries.
Stir the lemon juice and vanilla, if using, into the syrup.
Use the syrup right away, or let cool completely, transfer to an air-tight container, and store in the fridge for up to 3 weeks.
Don’t toss the leftover fruit! Store the blueberries in an air-tight container container in the fridge for up to 1 week. They make a delicious topping for yogurt, oatmeal, pancakes, waffles, French toast, ice cream, or even stirred into a mocktail for added texture and flavor.