It is desirable to align the two-dimensional perovskite layers vertical to the electrodes to maximize device performance but the formation mechanism is unclear. Here Chen et al. reveal that the film formation starts at the liquid-air interface and is thus independent of the choice of substrates.