Measure out the cocoa powder and sugar and mix in a saucepan, making sure that the cocoa powder is completely incorporated into the sugar.
Add cold water and a large pinch of salt and mix well with a wooden spoon.
Place on a very low heat and let the sugar slowly dissolve first.
Once the sugar is dissolved, increase the heat to medium/high and bring the syrup to boil.
Keep the syrup boiling until it thickens a bit. Stir if necessary to prevent the syrup from burning, but try to resist to stir constantly.
Once you are happy with the syrup thickness, remove the saucepan from the heat and either leave to cool in the saucepan or pour into a mixing bowl and leave to cool down.
Add vanilla extract and taste to check the flavour. If needed you can add more salt, but dissolve it completely in a tiny bit of water.
Pour the chocolate syrup into a bottle, jar or a squeeze bottle and store in the fridge.