TL;DR Many people planning to go on fasting (and even those already are on it) want to know whether coffee and other forms of caffeine will influence it. Experts seem to say different things - some think caffeine won't break the fast while others say better to steer clear. But our conclusion? It's okay to get your caffeine fix while fasting... as long as they don't have any add-ons!
Caffeine and fasting are controversial in some circles. Is it truly fasting if you have coffee or other liquids during your time of abstaining from eating? Some people say to be pure fast, one must drink only water and eat nothing. Others maintain that having coffee and/or other liquids is healthier and ensures you don’t become dehydrated.
Intermittent fasting (IF) has become not just a global health and fitness trend, but a way of life.
According to Healthline: 
Intermittent fasting is an eating pattern where you cycle between periods of eating and fasting.
It does not say anything about which foods to eat, but rather when you should eat them.
Doing IF is not just for losing weight, but also for better metabolism, improving medical conditions like diabetes, more optimal brain activity, a stronger immune system, and basically living longer. [2, 3, 4]
Dr. Joseph Mercola, an alternative medicine proponent, osteopathic physician, and the writer from Mercola.com explains the many benefits of fasting. He writes: 
Fasting, it turns out, has a number of health benefits that most people seek: from improved cardiovascular health and reduced cancer risk, to gene repair and longevity. It’s true that severe calorie restriction promotes both weight loss and longevity in animal models, but this kind of “starvation diet” is not a very appealing strategy for most people. However, newer research shows that you can get most if not all of the same benefits of severe calorie restriction through intermittent fasting, i.e. an eating schedule where you feast on some days, and dramatically cut calories on others. This effectively mimics the eating habits of our ancestors, who did not have access to grocery stores or food around the clock. They would cycle through periods of feast and famine …
Fasting also promotes a healthier body in many different ways, including:
Whatever your reason for fasting, you may find it leads to a healthier physical or spiritual state. Some people even fast or starve themselves to make political statements.
But in the realm of having your daily caffeine fix, here’s the bigger question:
Can you have your caffeine fix while intermittent fasting?
What if you have blood work first thing in the morning and you need your first cup of java at the same time?
Experts weigh in on this. Some say caffeine breaks the fast, while others say it’s okay to have your caffeine fix while fasting:
“Zero-calorie beverages are okay. As previously stated, I drink green tea in the morning for my caffeine kick while writing. If you want to drink water, black coffee, or tea during your fasting period, that’s okay. Remember, don’t overthink it – keep things simple! Track your results, listen to your body.”
"Autophagy is the self-cleaning process by which the body's cells break down and recycle damaged proteins and components. This is activated by intermittent fasting, but anything other than water (even black coffee) disrupts it to some extent.” 
"If you’re on a time-restricted fast and you’re in no-eating hours, it’s best to stick to no- or low-calorie drinks like water, coffee (with no milk) and tea. If you’re on an alternate day diet or something similar, even during low calorie hours, you can technically drink whatever you’d like — but remember, this will count against your calories. Would you rather spend 100 calories on an apple or a glass of milk? It’s your call.” 
Is having black coffee fasting? Doctors keep telling patients it is all right to have black coffee before fasting blood work (fasting sugar, fasting lipid panel).
It depends to some extent on what test is being performed, but for many tests that require fasting, intake of non-carbohydrate containing liquids a few hours before testing will not impact results. We have worked here to make 1 standard definition of “fasting” that encompasses most test requirements. We allow clear liquids (water, black coffee) up until 2 hours before a test or procedure. The definition of fasting should be clarified for all procedures in your institution if possible.
It depends to some extent on what test is being performed, but for many tests that require fasting, intake of non-carbohydrate containing liquids a few hours before testing will not impact results.
We have worked here to make 1 standard definition of “fasting” that encompasses most test requirements. We allow clear liquids (water, black coffee) up until 2 hours before a test or procedure. The definition of fasting should be clarified for all procedures in your institution if possible.
It seems in all but the most extreme fasts, coffee and tea are allowed, though sugar-containing and caffeinated drinks like sodas and fruit juices may be considered breaking a fast.
That said, if you fast for a long time (again we emphasize you should fast for lengthy periods only with a doctor’s guidance) pure fruit juices may be one way to take in some calories and needed carbohydrates.
There are sources of caffeine other than coffee, tea and soda. Viter Energy Mints contain ingredients that might affect blood test results and that might nullify a spiritual fast. However, No-Doz and some types of non-steroidal anti-inflammatory drugs contain caffeine, but again, check with your doctor before have blood drawn.
Here’s a toast to your health!
Is there a big difference between synthetic and natural caffeine? Which gives a stronger jolt? Does it even matter?
Natural caffeine in coffee, tea, and chocolate is much less common than the synthetic caffeine found in so many other products.
Caffeine is found in plant species such as the more popular ones like Coffea arabica and Coffea robusta, as well as tea leaves, kola nuts, cacao beans, Yerba mate and guarana berries.
Not only does naturally-occurring caffeine from said plants keep your cognitive functions at their peak, but it also contains antioxidants that help you fight illnesses like cancer and Alzheimer’s.