IntroductionThe objective of this randomised controlled trial (RCT) is to examine the effects of smartphone-based cognitive–behavioural therapy (CBT) in preventing the onset of major depressive episodes (MDE) among pregnant women.Methods and analysisThe target study population will be pregnant women of 16–20 weeks gestation who are currently users of ‘Luna Luna Baby’, the most widely used app for pregnant women in Japan. Those who meet the eligibility criteria will be randomly allocated to the 6-module internet CBT programme that was newly developed for pregnant women (n=2500), or to a treatment-as-usual control group (n=2500). Participants in the intervention groups will be required to complete the programme by 32 weeks gestation. The primary outcomes are the number of new onsets of MDE, measured by using WHO Composite International Diagnostic Interview 3.0 at 32 weeks gestation and 3 months post partum. Survival analysis will be conducted to test for the effectiveness of the intervention on the time to the onset of MDE.Ethics and disseminationThe study plan has been approved by the Research Ethics Review Board of the Graduate School of Medicine/Faculty of Medicine, the University of Tokyo (2019150NI). If the intervention programmes are found to produce a significant positive effect in this RCT, these programmes can be made available for all users of the app in the future.Trial registration numberUMIN000038190; Pre-results.