During Ramadan, millions of Muslims fast from sunrise to sunset. Fasting influences the hormonal system, sympathetic activity, blood circulation, and metabolic pathways. Because of these changes, we employed optical coherence tomography angiography (OCTA) to investigate the effects of fasting on the macula and optic nerve. In this prospective before-and-after study, both eyes of 45 participants were examined. Vascular characteristics of the macula and optic nerve head were evaluated in the morning and evening, once before Ramadan and once on the 20th day of Ramadan. Compared to the non-fasting condition, fasting significantly reduced inner parafoveal retinal thickness in both eyes and total foveal retinal thickness in the left eye in the morning and evening. Fasting in the morning also considerably reduced inner foveal retinal thickness in both eyes and total parafoveal retinal thickness in the right eye. Fasting significantly reduced central choroidal flow (1mm) in both eyes in the evening (all p-values are < 0.05). In the morning, there were significant increases in the foveal avascular zone (FAZ) area (p-value = 0.006) and deep parafoveal vascular density in the left eye (p-value = 0.001). Fasting alters both the macular characteristics and the optic nerve head, as seen in OCTA, although it did not affect participants' vision. However, further research is needed before reaching a broad conclusion.