The great news is that you can eat chocolate when you are on a ketogenic diet, but you have to choose wisely. Dark chocolate is your best bet, and seeing as you will find some carbohydrates in dark chocolate, you just want to make sure that your carbohydrate intake is low enough for the rest of the day.
Generally, it is suggested that your diet should consist of around 5% carbohydrates only. So if you choose chocolate that is low in sugar, and I have found quite a few brands that have brought out keto-friendly milk chocolates too, and ensure you stay within the limit.
So, to answer the question: “Is chocolate a keto-friendly food?” It can be keto. You just need to choose the right ones.
You can also make your own chocolate keto desserts. There are quite a few recipes in my book, The Dessert Diet Club, that will prove that you can get your fix on a low-carb diet.