PurposeThe aim of this study was to examine the effect of online breastfeeding education on breastfeeding motivation. Design and methodsThe study had a single blind randomized, controlled, experimental design. The women in the online education group were primipara and in their postpartum 4–8 weeks and fulfilled inclusion criteria for the study. The study population comprised of the women presenting to the pregnancy outpatient clinic or giving birth in the gynecological and obstetrics clinic of a university hospital hospital in the West of Turkey and hearing about the Online Breastfeeding Education through social media. The sample size was calculated through a similar study. Data were collected between February 2022–November 2022. Simple random sampling was used and the study sample comprised of 50 women, of whom 25 were in the online breastfeeding education group and 25 were in the control group. Online breastfeeding education was given in groups of three or two, depending on availability, via the video communication platform (Zoom Video Communications). The control group received routine care. Data analysis was made with descriptive statistics, Wilcoxon rank sum test and Mann Whitney U test. ResultsIntegrative motivation (U = 284, p < .05) and intrinsic motivation-identified regulation (U = 196, p < .05) significantly increased compared to the control group. ConclusionOnline breastfeeding education offered in the postpartum period can help to increase breastfeeding rates. Practice implicationsIt is recommended that nurses monitor breastfeeding status in the postpartum period and motivate mothers with online breastfeeding training in cases where access is not available.Trial registration: Registered 12 February 2022 on www.ClinicalTrials.gov (NCT05262231).