We prove modularity of formal series of Jacobi forms that satisfy a natural symmetry condition. They are formal analogs of Fourier–Jacobi expansions of Siegel modular forms. From our result and a theorem of Wei Zhang, we deduce Kudla's conjecture on the modularity of generating series of special cycles of arbitrary codimension and for all orthogonal Shimura varieties.