Two dimensional metal halide perovskites have demonstrated exceptional stability and performance in various optoelectronic applications. A key to higher performance is to align the insulating organic layers vertical to the substrates to avoid inhibition of charge transport. Several fabrication routes have been presented in literature but there is not yet a general strategy to orient 2D perovskite sheets vertically to the electrodes, due to lack of understanding of the crystallization process. In our research, based on our previous discovery that vertically oriented 2D perovskite crystallization can occur at liquid-air interface (Nature Communications 9, 1336 (2018)), we found that a low supersaturation during 2D perovskite crystallization is crucial for a strong degree of crystallographic orientation, confirmed by our in-situ grazing incidence X-ray diffraction measurement on thin films formed from different supersaturation environments. This understanding leads to a general strategy to fabricate vertically oriented 2D perovskite thin films through rational selection of solution formulation, organic spacers and processing conditions. It also allows control of the degree of orientation from complete random to complete vertical orientation. With this strategy we demonstrate vertically oriented thin films with various organic spacers and devices with high performance and long term stability.