In a medium saucepan, add cocoa powder, granulated sugar, salt and water. Whisk to combine.
Place the saucepan over medium heat. Whisk constantly as the mixture heats up and begins to thicken.
Once it reaches a simmer, reduce the heat to medium-low and let it simmer for about 3 minutes, stirring occasionally.
Remove the saucepan from the heat. Stir in the vanilla extract.
Let the chocolate syrup cool in the pan; it will continue to thicken as it cools.
Once cooled, transfer the syrup to a clean, airtight glass jar or container for storage. Refrigerate for up to 3 weeks.