Clean the blackberries well (if using fresh) in a bath of salt water or vinegar. Rinse well.
In a small saucepan, combine sugar, water, and blackberries. Heat over medium-high heat until simmering, stirring occasionally. Once softened, gently smash the softened berries with the back of a spoon or masher. Simmer for 6-8 minutes until the berries have disintegrated into seeds and the syrup is bright purple.
Remove from heat and strain out the berries and seeds through a fine-mesh sieve. Use a spoon to stir the mixture to release the syrup as needed, being careful to not let any seeds or fruit bits into the syrup. Discard the seeds.
Optional: stir in a squeeze of fresh lemon juice to bring out the berry flavor if it's tasting flat; it's not about adding lemon flavor but rather enhancing the blackberry notes.
Let cool as needed and use immediately or store in an airtight container in the fridge for up to 2 weeks.