The transfer of data across borders supports trade in most service industries around the world as well as the growth of traditional manufacturing sectors. However, several countries have begun to adopt laws impeding the cross-border transfer of data, ostensibly in pursuit of policy objectives such as national security, public morals or public order, and privacy. Such domestic measures create potential concerns under both international trade law and international investment law. Accordingly, recent trade and investment negotiations such as the Trans-Pacific Partnership Agreement (TPP) include specific provisions mandating the permissibility of cross-border data transfer and prohibiting data localization in certain circumstances. Although World Trade Organization law contains no such specific provisions, restrictive data transfer measures could breach the non-discrimination and market access disciplines under the General Agreement on Trade in Services (GATS), except to the extent that they are justified under the general exception in GATS art. XIV. International investment law may also apply to measures restricting data transfer, particularly if investment arbitrators take into account holistic changes in the digital economy to interpret the scope of covered investments and the meaning of investment obligations.The application of general trade and investment law disciplines to data transfer restrictions and localization requirements remain uncertain. The more specific provisions in the TPP, while welcome, fail to address this uncertainty. These fields must be better synchronized with each other in respect of data transfer and with the realities of the digital economy. A comprehensive legal framework⎯including coverage of trade and investment law⎯and extensive policy coordination across a variety of stakeholders would better enable open, secure and efficient data flows across borders.