The fabrication of n- and p-type semiconducting channels based on the same layered material would simplify the implementation of 2D electronics. Here, the authors report a spatially selective doping method for the synthesis of wafer-scale p- and n-type 2H-MoTe2 thin films, and their application for the realization of complementary 2D transistor and inverter arrays.