The ketogenic diet is a high-fat, adequate-protein, low-carbohydrate diet that in medicine is used primarily to treat difficult-to-control (refractory) epilepsy in children. The diet forces the body to burn fats rather than carbohydrates. Normally, the carbohydrates contained in food are converted into glucose, which is then transported around the body and is particularly important in fueling brain function. However, if little carbohydrate remains in the diet, the liver converts fat into fatty acids and ketone bodies. The ketone bodies pass into the brain and replace glucose as an energy source.
Depending of the propose of the diet macronutrient ratio may vary. Usually carbohydrates should be below 20g and net fat to net protein ratio should be 2:1 or even more to 3:1 , 4:1 etc
During the past years ketogenic diet became very popular as a fast and sustainable way to optimize weight and performance. In the same time variations of ketogenic diet are used in medicine to improve conditions like: diabetes type 1 and type 2, other autoimune disorders, Alzheimer's disease, amyotrophic lateral sclerosis, headache, neurotrauma, pain, Parkinson's disease, and sleep disorders and many others.
Ketogenic diet has many variations depending on the condition treated. The popular versions promoted on social media could de guided by not so optimal rules and could lead to some serious mistakes and problems, not because the proportion of macro nutrients but because of overconsumption of unhealthy ingredients like vegetable oils, dairy, seeds, nuts, spices, artificial sweeteners ingredients that are very high in anti-nutrients and or have high inflammatory response.
For optimal health, ketogenic diet is best to be formulated for every individual by a doctor or dietician specialised in this way of eating.