Inorganic halide perovskites CsPb X3(X = I, Br) have attracted tremendous attention in solar cell applications. However, the bulk form of the cubic phase CsPb X3, which offers moderate direct bandgaps, is metastable at room temperature and tends to transform into a tetragonal or orthorhombic phase. Here, our density functional theory calculation results found that the surface energies of the cubic phase are smaller than those of the orthorhombic phase, although the bulk counterpart of the cubic phase is less stable than that of the orthorhombic phase. These results suggest a surface stabilization strategy to maintain the stability of the cubic phase at room temperature that an enlarged portion of surfaces shall change the relative stability of the two phases in nanostructured CsPb X3. This strategy, which may potentially solve the long-standing stability issue of cubic CsPb X3, was demonstrated to be feasible by our calculations in zero-, one-, and two-dimensional nanostructures. In particular, confined sizes from few to tens of nanometers could keep the cubic phase as the most thermally favored form at room temperature. Our predicted values in particular cases, such as the zero-dimensional form of CsPbI3,are highly consistent with experimental values, suggesting that our model is reasonable and our results are reliable. These predicted critical sizes give the upper and lower limits of the confined sizes, which may guide experimentalists to synthesize these nanostructures and promote likely practical applications such as solar cells and flexible displays using CsPb X3nanostructures.