We examine the effects of regulation requiring data portability and interoperability in digital platform competition. Data portability and interoperability have the effect of eliminating switching costs between platforms and enlarging network externalities but increasing the risk of data breaches. We show that in the absence of data breaches, the regulation improves welfare by reducing switching costs and increasing network benefits. We also show that with data breach accidents, ensuring data portability and interoperability increases the accident probability, but the joint and several liability with negligence standards can attain the social optimum by inducing firms to take efficient care to prevent accidents.